diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-23 05:46:05 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-23 05:46:05 +0000 |
commit | 0cd7cac27701f96dbac5917d15a26b707b40f146 (patch) | |
tree | 6b1bf16df129fc837a40a00b8fcab71bd7d828db | |
parent | 603e0c4dc854e954f0ea72764c2e19122a4e3149 (diff) | |
download | portage-0cd7cac27701f96dbac5917d15a26b707b40f146.tar.gz portage-0cd7cac27701f96dbac5917d15a26b707b40f146.tar.bz2 portage-0cd7cac27701f96dbac5917d15a26b707b40f146.zip |
Make --fetchonly disable background mode.
svn path=/main/trunk/; revision=11170
-rw-r--r-- | pym/_emerge/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 0b3b2cf6b..7d24e16ce 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -8644,6 +8644,10 @@ class Scheduler(PollScheduler): "--fetchonly", "--fetch-all-uri", "--nodeps", "--pretend"]) + _opts_no_background = \ + frozenset(["--pretend", + "--fetchonly", "--fetch-all-uri"]) + _opts_no_restart = frozenset(["--buildpkgonly", "--fetchonly", "--fetch-all-uri", "--pretend"]) @@ -8819,7 +8823,7 @@ class Scheduler(PollScheduler): @returns: True if background mode is enabled, False otherwise. """ background = (self._max_jobs > 1 or "--quiet" in self.myopts) and \ - "--pretend" not in self.myopts + not bool(self._opts_no_background.intersection(self.myopts)) self._status_display.quiet = \ not background or \ @@ -9489,7 +9493,7 @@ class Scheduler(PollScheduler): # Only allow 1 job max if a restart is scheduled # due to portage update. if self._is_restart_scheduled() or \ - "--pretend" in self.myopts: + self._opts_no_background.intersection(self.myopts): self._set_max_jobs(1) merge_queue = self._task_queues.merge |