commit: 7a16988f4765963896170b92253ebbd4344216ea Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Wed Apr 22 16:58:38 2015 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Wed Apr 22 16:58:38 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=7a16988f
portage/sync/controller.py: Fix postsync hook regression (bug 547414) It seems the migration from the portage-utils postsync hook script to the native portage one causes problems. This is due to the fact the portage-utils supplied script did not pass on any arguments, even though emerge did pass on the uri to it. X-Gentoo-Bug: 547414 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=547414 pym/portage/sync/controller.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py index 6dec3c8..307487f 100644 --- a/pym/portage/sync/controller.py +++ b/pym/portage/sync/controller.py @@ -175,8 +175,13 @@ class SyncManager(object): writemsg_level("Spawning post_sync hook: %s\n" % (_unicode_decode(_hooks[filepath])), level=logging.ERROR, noiselevel=4) - retval = portage.process.spawn([filepath, - reponame, dosyncuri, repolocation], env=self.settings.environ()) + if reponame: + retval = portage.process.spawn( + [filepath, reponame, dosyncuri, repolocation], + env=self.settings.environ()) + else: + retval = portage.process.spawn([filepath], + env=self.settings.environ()) if retval != os.EX_OK: writemsg_level(" %s Spawn failed for: %s, %s\n" % (bad("*"), _unicode_decode(_hooks[filepath]), filepath),
