1 |
Rename --autounmask-write to --autounmask. Please note that removing the |
2 |
option does not mean that the variable used for keeping track of |
3 |
autounmask writing is not removed from depgraph.py. |
4 |
--- |
5 |
man/emerge.1 | 19 +++++++++++-------- |
6 |
pym/_emerge/depgraph.py | 4 ++-- |
7 |
pym/_emerge/main.py | 18 +++++++++--------- |
8 |
3 files changed, 22 insertions(+), 19 deletions(-) |
9 |
|
10 |
diff --git a/man/emerge.1 b/man/emerge.1 |
11 |
index 58bdc94..e23d1b4 100644 |
12 |
--- a/man/emerge.1 |
13 |
+++ b/man/emerge.1 |
14 |
@@ -322,10 +322,20 @@ invalid input. This helps prevent accidental |
15 |
acceptance of the first choice. This option is |
16 |
intended to be set in the \fBmake.conf\fR(5) |
17 |
\fBEMERGE_DEFAULT_OPTS\fR variable. |
18 |
-\fB\-\-autounmask\-write\fR option. The |
19 |
+\fB\-\-autounmask\fR option. The |
20 |
\fBEMERGE_DEFAULT_OPTS\fR variable may be used to |
21 |
disable this option by default in \fBmake.conf\fR(5). |
22 |
.TP |
23 |
+.BR "\-\-autounmask [ y | n ]" |
24 |
+Write required unmask changes to the relevant config files, respecting |
25 |
+\fBCONFIG_PROTECT\fR. If invoked together with \fB\-\-ask\fR, emerge will |
26 |
+prompt you to write the changes. If invoked along with \fB\-\-pretend\fR, |
27 |
+emerge will merely output the required changes and not make any of them by |
28 |
+itself. If the corresponding package.* is a file, the changes are appended to |
29 |
+it, if it is a directory, changes are written to the lexicographically last |
30 |
+file. This way it is always ensured that the new changes take precedence over |
31 |
+existing changes. |
32 |
+.TP |
33 |
.BR "\-\-autounmask\-unrestricted\-atoms [ y | n ]" |
34 |
Keyword and mask changes using the \'=\' operator will be written. With this |
35 |
option, \'>=\' operators will be used whenever possible. USE and license |
36 |
@@ -335,13 +345,6 @@ changes always use the latter behavior. |
37 |
No package.unmask or ** keyword changes will be created if this is activated. |
38 |
This leads to unsatisfied dependencies if no other solution exists. |
39 |
.TP |
40 |
-.BR "\-\-autounmask\-write [ y | n ]" |
41 |
-Write required unmask changes to the relevant config files, respecting |
42 |
-\fBCONFIG_PROTECT\fR and \fB\-\-ask\fR. If the corresponding package.* is a |
43 |
-file, the changes are appended to it, if it is a directory, changes are written |
44 |
-to the lexicographically last file. This way it is always ensured that the new |
45 |
-changes take precedence over existing changes. |
46 |
-.TP |
47 |
.BR \-\-backtrack=COUNT |
48 |
Specifies an integer number of times to backtrack if |
49 |
dependency calculation fails due to a conflict or an |
50 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
51 |
index 9fdfa43..5b4b723 100644 |
52 |
--- a/pym/_emerge/depgraph.py |
53 |
+++ b/pym/_emerge/depgraph.py |
54 |
@@ -6806,7 +6806,7 @@ class depgraph(object): |
55 |
(using CONFIG_PROTECT). The message includes the comments and the changes. |
56 |
""" |
57 |
|
58 |
- autounmask_write = self._frozen_config.myopts.get("--autounmask-write", "n") == True |
59 |
+ autounmask_write = self._frozen_config.myopts.get("--autounmask", "n") == True |
60 |
autounmask_unrestricted_atoms = \ |
61 |
self._frozen_config.myopts.get("--autounmask-unrestricted-atoms", "n") == True |
62 |
quiet = "--quiet" in self._frozen_config.myopts |
63 |
@@ -7168,7 +7168,7 @@ class depgraph(object): |
64 |
chk_updated_cfg_files(root, |
65 |
[os.path.join(os.sep, USER_CONFIG_PATH)]) |
66 |
elif not pretend and not autounmask_write and roots: |
67 |
- writemsg("\nUse --autounmask-write to write changes to config files (honoring\n" |
68 |
+ writemsg("\nUse --autounmask to write changes to config files (honoring\n" |
69 |
"CONFIG_PROTECT). Carefully examine the list of proposed changes,\n" |
70 |
"paying special attention to mask or keyword changes that may expose\n" |
71 |
"experimental or unstable packages.\n", |
72 |
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py |
73 |
index fc73ef7..247317d 100644 |
74 |
--- a/pym/_emerge/main.py |
75 |
+++ b/pym/_emerge/main.py |
76 |
@@ -123,9 +123,9 @@ def insert_optional_args(args): |
77 |
|
78 |
default_arg_opts = { |
79 |
'--ask' : y_or_n, |
80 |
+ '--autounmask' : y_or_n, |
81 |
'--autounmask-keep-masks': y_or_n, |
82 |
'--autounmask-unrestricted-atoms' : y_or_n, |
83 |
- '--autounmask-write' : y_or_n, |
84 |
'--buildpkg' : y_or_n, |
85 |
'--complete-graph' : y_or_n, |
86 |
'--deep' : valid_integers, |
87 |
@@ -302,6 +302,11 @@ def parse_opts(tmpcmdline, silent=False): |
88 |
"choices" : true_y_or_n |
89 |
}, |
90 |
|
91 |
+ "--autounmask": { |
92 |
+ "help" : "automatically unmask packages", |
93 |
+ "choices" : true_y_or_n |
94 |
+ }, |
95 |
+ |
96 |
"--autounmask-unrestricted-atoms": { |
97 |
"help" : "write autounmask changes with >= atoms if possible", |
98 |
"choices" : true_y_or_n |
99 |
@@ -312,11 +317,6 @@ def parse_opts(tmpcmdline, silent=False): |
100 |
"choices" : true_y_or_n |
101 |
}, |
102 |
|
103 |
- "--autounmask-write": { |
104 |
- "help" : "write changes made by --autounmask to disk", |
105 |
- "choices" : true_y_or_n |
106 |
- }, |
107 |
- |
108 |
"--accept-properties": { |
109 |
"help":"temporarily override ACCEPT_PROPERTIES", |
110 |
"action":"store" |
111 |
@@ -667,15 +667,15 @@ def parse_opts(tmpcmdline, silent=False): |
112 |
else: |
113 |
myoptions.ask = None |
114 |
|
115 |
+ if myoptions.autounmask in true_y: |
116 |
+ myoptions.autounmask = True |
117 |
+ |
118 |
if myoptions.autounmask_unrestricted_atoms in true_y: |
119 |
myoptions.autounmask_unrestricted_atoms = True |
120 |
|
121 |
if myoptions.autounmask_keep_masks in true_y: |
122 |
myoptions.autounmask_keep_masks = True |
123 |
|
124 |
- if myoptions.autounmask_write in true_y: |
125 |
- myoptions.autounmask_write = True |
126 |
- |
127 |
if myoptions.buildpkg in true_y: |
128 |
myoptions.buildpkg = True |
129 |
|
130 |
-- |
131 |
1.8.3.2 |