"--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"])
@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 \
# 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