1 |
On 09/19/2014 12:56 AM, Alexander Berntsen wrote: |
2 |
> --- a/pym/_emerge/depgraph.py |
3 |
> +++ b/pym/_emerge/depgraph.py |
4 |
> @@ -7514,12 +7514,15 @@ class depgraph(object): |
5 |
> (using CONFIG_PROTECT). The message includes the comments and the changes. |
6 |
> """ |
7 |
> |
8 |
> - autounmask_write = self._frozen_config.myopts.get("--autounmask-write", "n") == True |
9 |
> + ask = "--ask" in self._frozen_config.myopts |
10 |
> + autounmask_write_y = \ |
11 |
> + self._frozen_config.myopts.get("--autounmask-write", "y") |
12 |
> + autounmask_write = not autounmask_write_y == "n" and \ |
13 |
> + (ask or autounmask_write_y is True) |
14 |
> autounmask_unrestricted_atoms = \ |
15 |
> self._frozen_config.myopts.get("--autounmask-unrestricted-atoms", "n") == True |
16 |
> quiet = "--quiet" in self._frozen_config.myopts |
17 |
> pretend = "--pretend" in self._frozen_config.myopts |
18 |
> - ask = "--ask" in self._frozen_config.myopts |
19 |
> enter_invalid = '--ask-enter-invalid' in self._frozen_config.myopts |
20 |
> |
21 |
> def check_if_latest(pkg): |
22 |
> |
23 |
|
24 |
Maybe this version is a little more readable: |
25 |
|
26 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
27 |
index f4e5a1b..ac3ceb8 100644 |
28 |
--- a/pym/_emerge/depgraph.py |
29 |
+++ b/pym/_emerge/depgraph.py |
30 |
@@ -7516,12 +7516,13 @@ class depgraph(object): |
31 |
(using CONFIG_PROTECT). The message includes the comments and the changes. |
32 |
""" |
33 |
|
34 |
- autounmask_write = self._frozen_config.myopts.get("--autounmask-write", "n") == True |
35 |
+ ask = "--ask" in self._frozen_config.myopts |
36 |
+ autounmask_write = \ |
37 |
+ self._frozen_config.myopts.get("--autounmask-write", ask) is True |
38 |
autounmask_unrestricted_atoms = \ |
39 |
self._frozen_config.myopts.get("--autounmask-unrestricted-atoms", "n") == True |
40 |
quiet = "--quiet" in self._frozen_config.myopts |
41 |
pretend = "--pretend" in self._frozen_config.myopts |
42 |
- ask = "--ask" in self._frozen_config.myopts |
43 |
enter_invalid = '--ask-enter-invalid' in self._frozen_config.myopts |
44 |
|
45 |
def check_if_latest(pkg): |
46 |
|
47 |
|
48 |
|
49 |
-- |
50 |
Thanks, |
51 |
Zac |