From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/sync/
Date: Wed, 23 Sep 2015 22:32:47 +0000 (UTC) [thread overview]
Message-ID: <1443047496.200d876b01dd11521cdcd9bfa07abdca165d24e8.zmedico@gentoo> (raw)
commit: 200d876b01dd11521cdcd9bfa07abdca165d24e8
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 23 16:16:45 2015 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Sep 23 22:31:36 2015 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=200d876b
SyncManager.async: initialize attributes before fork (bug 561234)
Since commit 496ff326dc18890889d1ea5d2aec590394635960, the pre_sync
method executes in a forked child process. Therefore, initialize
attributes before the fork (in the async method).
Fixes: 496ff326dc18 ("sync repositories in parallel (bug 557426)")
X-Gentoo-Bug: 561234
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=561234
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>
pym/portage/sync/controller.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py
index e992cc4..28dbc57 100644
--- a/pym/portage/sync/controller.py
+++ b/pym/portage/sync/controller.py
@@ -115,13 +115,16 @@ class SyncManager(object):
return []
def async(self, emerge_config=None, repo=None):
+ self.emerge_config = emerge_config
+ self.settings, self.trees, self.mtimedb = emerge_config
+ self.xterm_titles = "notitles" not in self.settings.features
+ self.portdb = self.trees[self.settings['EROOT']]['porttree'].dbapi
proc = AsyncFunction(target=self.sync,
kwargs=dict(emerge_config=emerge_config, repo=repo))
proc.addExitListener(self._sync_callback)
return proc
def sync(self, emerge_config=None, repo=None):
- self.emerge_config = emerge_config
self.callback = None
self.repo = repo
self.exitcode = 1
@@ -199,13 +202,10 @@ class SyncManager(object):
def pre_sync(self, repo):
- self.settings, self.trees, self.mtimedb = self.emerge_config
- self.xterm_titles = "notitles" not in self.settings.features
msg = ">>> Syncing repository '%s' into '%s'..." \
% (repo.name, repo.location)
self.logger(self.xterm_titles, msg)
writemsg_level(msg + "\n")
- self.portdb = self.trees[self.settings['EROOT']]['porttree'].dbapi
try:
st = os.stat(repo.location)
except OSError:
next reply other threads:[~2015-09-23 22:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 22:32 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-09-17 23:59 [gentoo-commits] proj/portage:master commit in: pym/portage/sync/ Zac Medico
2015-12-12 23:42 Zac Medico
2015-11-24 16:16 Zac Medico
2015-10-06 16:27 Zac Medico
2015-08-30 23:52 Zac Medico
2015-07-14 21:31 Brian Dolbec
2015-04-22 16:59 Brian Dolbec
2015-02-09 20:12 Brian Dolbec
2015-02-09 20:12 Brian Dolbec
2015-01-18 18:04 Michał Górny
2014-12-07 22:57 Michał Górny
2014-12-07 9:15 Brian Dolbec
2014-12-07 5:42 Brian Dolbec
2014-12-04 20:16 Brian Dolbec
2014-12-04 20:16 Brian Dolbec
2014-12-04 20:16 Brian Dolbec
2014-12-04 20:04 [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 ` [gentoo-commits] proj/portage:master " Brian Dolbec
2014-12-04 20:04 [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 ` [gentoo-commits] proj/portage:master " Brian Dolbec
2014-12-04 20:04 [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 ` [gentoo-commits] proj/portage:master " Brian Dolbec
2014-12-04 20:04 [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 ` [gentoo-commits] proj/portage:master " Brian Dolbec
2014-12-04 20:04 [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 ` [gentoo-commits] proj/portage:master " Brian Dolbec
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=1443047496.200d876b01dd11521cdcd9bfa07abdca165d24e8.zmedico@gentoo \
--to=zmedico@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