Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: parallel_emerge

Issue 2990001: Teach parallel_emerge to uninstall packages. (Closed) Base URL: ssh://git@chromiumos-git/crosutils.git
Patch Set: Remove unnecessary --oneshot Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: parallel_emerge
diff --git a/parallel_emerge b/parallel_emerge
index 60f5eba3c57cc5249e42d32501a732efa1280063..b2b61a1dbee53fc303f5ab909dbc29335d6a6271 100755
--- a/parallel_emerge
+++ b/parallel_emerge
@@ -566,7 +566,7 @@ class EmergeQueue(object):
len(self._jobs), len(self._retry_queue), self._total_jobs,
seconds / 60, seconds % 60, self._LoadAvg())
- def _LaunchOneEmerge(self, target):
+ def _LaunchOneEmerge(self, target, action):
"""Run emerge --nodeps to do a single package install.
If this is a pseudopackage, that means we're done, and can select in in the
@@ -594,6 +594,8 @@ class EmergeQueue(object):
newtarget = target.replace("original-", "")
cmdline = (EmergeCommand() + " --nodeps --selective --noreplace " +
newtarget)
+ elif action == "uninstall":
+ cmdline = EmergeCommand() + " --nodeps --unmerge =" + target
else:
# This package is a dependency of something we specifically
# requested. Therefore we should install it but not allow it
@@ -671,7 +673,7 @@ class EmergeQueue(object):
else:
# Kick off the build if it's marked to be built.
print "Emerging %s (%s)" % (target, action)
- job = self._LaunchOneEmerge(target)
+ job = self._LaunchOneEmerge(target, action)
# Append it to the active jobs list.
self._jobs.append(job)
continue
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698