public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:prefix commit in: lib/portage/
Date: Mon,  4 Jan 2021 12:07:57 +0000 (UTC)	[thread overview]
Message-ID: <1609761985.13b2f0d1edd4f70c3bf776503cdc505ccf04f2d3.grobian@gentoo> (raw)

commit:     13b2f0d1edd4f70c3bf776503cdc505ccf04f2d3
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 12:06:25 2021 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jan  4 12:06:25 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=13b2f0d1

lib/portage: add more definite fix for macOS multiprocessing default

force 'fork' method for as long as we get pickle errors whilst using
'spawn'

Bug: https://bugs.gentoo.org/758230
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 lib/portage/__init__.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
index a5cc8fb08..ec1b50107 100644
--- a/lib/portage/__init__.py
+++ b/lib/portage/__init__.py
@@ -19,6 +19,8 @@ try:
 	import re
 	import types
 	import platform
+	# PREFIX LOCAL
+	import multiprocessing
 
 	# Temporarily delete these imports, to ensure that only the
 	# wrapped versions are imported by portage internals.
@@ -38,6 +40,16 @@ except ImportError as e:
 	sys.stderr.write("    "+str(e)+"\n\n")
 	raise
 
+# BEGIN PREFIX LOCAL
+# for bug #758230, on macOS the default was switched from fork to spawn,
+# the latter causing issues because all kinds of things can't be
+# pickled, so force fork mode for now
+try:
+	multiprocessing.set_start_method('fork')
+except RuntimeError:
+	pass
+# END PREFIX LOCAL
+
 try:
 
 	import portage.proxy.lazyimport


             reply	other threads:[~2021-01-04 12:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 12:07 Fabian Groffen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-18 11:51 [gentoo-commits] proj/portage:prefix commit in: lib/portage/ Fabian Groffen
2023-11-25 19:08 Fabian Groffen
2023-11-24 20:06 Fabian Groffen
2022-07-24  9:45 Fabian Groffen
2021-01-04 10:42 Fabian Groffen
2019-07-01 13:11 Fabian Groffen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1609761985.13b2f0d1edd4f70c3bf776503cdc505ccf04f2d3.grobian@gentoo \
    --to=grobian@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox