From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6565F158089 for ; Tue, 24 Oct 2023 17:45:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A0A7B2BC013; Tue, 24 Oct 2023 17:45:19 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 838392BC013 for ; Tue, 24 Oct 2023 17:45:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7FCB5335CB7 for ; Tue, 24 Oct 2023 17:45:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D929012BC for ; Tue, 24 Oct 2023 17:45:16 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1698165675.cebe9363cc348cea8d997afc638abf38ca79ed47.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/sync/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/sync/controller.py X-VCS-Directories: lib/portage/sync/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: cebe9363cc348cea8d997afc638abf38ca79ed47 X-VCS-Branch: master Date: Tue, 24 Oct 2023 17:45:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c193b687-8768-483c-a55b-c0a234e9311f X-Archives-Hash: db1835901cf38abc8d259e31f13e4ed4 commit: cebe9363cc348cea8d997afc638abf38ca79ed47 Author: Zac Medico gentoo org> AuthorDate: Tue Oct 24 16:39:29 2023 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Oct 24 16:41:15 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=cebe9363 SyncManager: multiprocessing spawn compat Tested via lib/portage/tests/ebuild/test_fetch.py with bin/emerge patched to call: multiprocessing.set_start_method("spawn", force=True) Bug: https://bugs.gentoo.org/916231 Signed-off-by: Zac Medico gentoo.org> lib/portage/sync/controller.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/portage/sync/controller.py b/lib/portage/sync/controller.py index 1cfbb24ba0..da593e1a85 100644 --- a/lib/portage/sync/controller.py +++ b/lib/portage/sync/controller.py @@ -89,13 +89,20 @@ class SyncManager: # files have sane permissions. os.umask(0o22) - self.module_controller = portage.sync.module_controller - self.module_names = self.module_controller.module_names self.hooks = {} for _dir in ["repo.postsync.d", "postsync.d"]: hooks = get_hooks_from_dir(_dir, prefix=self.settings["PORTAGE_CONFIGROOT"]) self.hooks[_dir] = hooks + @property + def module_controller(self): + # Not stored as local attribute because it's not picklable. + return portage.sync.module_controller + + @property + def module_names(self): + return self.module_controller.module_names + def __getattr__(self, name): if name == "async": warnings.warn(