Make --pretend disable background mode and imply --jobs=1.
authorZac Medico <zmedico@gentoo.org>
Tue, 22 Jul 2008 03:25:08 +0000 (03:25 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 22 Jul 2008 03:25:08 +0000 (03:25 -0000)
svn path=/main/trunk/; revision=11162

pym/_emerge/__init__.py

index 60d3fe2c7d5ae49dc34518275c8cbffb42416808..cc2c20a828a81dead0871b7b9f80b7ee3a77796d 100644 (file)
@@ -8808,7 +8808,8 @@ class Scheduler(PollScheduler):
                @rtype: bool
                @returns: True if background mode is enabled, False otherwise.
                """
-               background = self._max_jobs > 1 or "--quiet" in self.myopts
+               background = (self._max_jobs > 1 or "--quiet" in self.myopts) and \
+                       "--pretend" not in self.myopts
 
                self._status_display.quiet = \
                        not background or \
@@ -9473,7 +9474,8 @@ class Scheduler(PollScheduler):
 
                # Only allow 1 job max if a restart is scheduled
                # due to portage update.
-               if self._is_restart_scheduled():
+               if self._is_restart_scheduled() or \
+                       "--pretend" in self.myopts:
                        self._set_max_jobs(1)
 
                merge_queue = self._task_queues.merge