1 |
Author: zmedico |
2 |
Date: 2008-07-23 05:46:05 +0000 (Wed, 23 Jul 2008) |
3 |
New Revision: 11170 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Make --fetchonly disable background mode. |
9 |
|
10 |
|
11 |
Modified: main/trunk/pym/_emerge/__init__.py |
12 |
=================================================================== |
13 |
--- main/trunk/pym/_emerge/__init__.py 2008-07-22 15:02:42 UTC (rev 11169) |
14 |
+++ main/trunk/pym/_emerge/__init__.py 2008-07-23 05:46:05 UTC (rev 11170) |
15 |
@@ -8644,6 +8644,10 @@ |
16 |
"--fetchonly", "--fetch-all-uri", |
17 |
"--nodeps", "--pretend"]) |
18 |
|
19 |
+ _opts_no_background = \ |
20 |
+ frozenset(["--pretend", |
21 |
+ "--fetchonly", "--fetch-all-uri"]) |
22 |
+ |
23 |
_opts_no_restart = frozenset(["--buildpkgonly", |
24 |
"--fetchonly", "--fetch-all-uri", "--pretend"]) |
25 |
|
26 |
@@ -8819,7 +8823,7 @@ |
27 |
@returns: True if background mode is enabled, False otherwise. |
28 |
""" |
29 |
background = (self._max_jobs > 1 or "--quiet" in self.myopts) and \ |
30 |
- "--pretend" not in self.myopts |
31 |
+ not bool(self._opts_no_background.intersection(self.myopts)) |
32 |
|
33 |
self._status_display.quiet = \ |
34 |
not background or \ |
35 |
@@ -9489,7 +9493,7 @@ |
36 |
# Only allow 1 job max if a restart is scheduled |
37 |
# due to portage update. |
38 |
if self._is_restart_scheduled() or \ |
39 |
- "--pretend" in self.myopts: |
40 |
+ self._opts_no_background.intersection(self.myopts): |
41 |
self._set_max_jobs(1) |
42 |
|
43 |
merge_queue = self._task_queues.merge |