From 677d9c9b6cc6a2459468070943cb46f7c149afd6 Mon Sep 17 00:00:00 2001 From: David James Date: Thu, 15 Jul 2010 19:32:36 -0700 Subject: [PATCH] Fix parallel_emerge --unmerge to actually work. When we run custom actions in parallel_emerge, we should pass the list of packages on to emerge. Otherwise emerge won't know what packages to unmerge. Besides the above, also fix an issue where --workon doesn't override --getbinpkgonly or --usepkgonly. TEST=Ran parallel_emerge --unmerge dhcpd and parallel_emerge --usepkgonly --board=x86-generic --workon=power_manager power_manager BUG=none Review URL: http://codereview.chromium.org/2927013 --- parallel_emerge | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/parallel_emerge b/parallel_emerge index 20cb3f0053..dd0dfac47c 100755 --- a/parallel_emerge +++ b/parallel_emerge @@ -604,9 +604,11 @@ class EmergeQueue(object): cmdline = EmergeCommand() + " --nodeps --oneshot " this_pkg = self._deps_map[target] if this_pkg["workon"]: - # --usepkg=n --getbinpkg=n: Build from source + # --usepkg=n --usepkgonly=n --getbinpkg=n + # --getbinpkgonly=n: Build from source # --selective=n: Re-emerge even if package is already installed. - cmdline += "--usepkg=n --getbinpkg=n --selective=n " + cmdline += ("--usepkg=n --usepkgonly=n --getbinpkg=n " + "--getbinpkgonly=n --selective=n ") cmdline += "=" + target deps_info = this_pkg["deps_info"] if deps_info["uninstall"]: @@ -753,7 +755,7 @@ OPTS, EMERGE_ACTION, EMERGE_OPTS, EMERGE_FILES = ParseArgs(sys.argv) if EMERGE_ACTION is not None: # Pass action arguments straight through to emerge EMERGE_OPTS["--%s" % EMERGE_ACTION] = True - sys.exit(os.system(EmergeCommand())) + sys.exit(os.system(EmergeCommand() + " " + " ".join(EMERGE_FILES))) elif not EMERGE_FILES: Usage() sys.exit(1)