Gentoo Archives: gentoo-portage-dev

From: Alexander Berntsen <bernalex@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Alexander Berntsen <alexander@××××××.net>
Subject: [gentoo-portage-dev] [PATCH 1/4] emerge: Deprecate --autounmask
Date: Tue, 12 Aug 2014 09:37:30
Message-Id: 1407836235-13528-2-git-send-email-bernalex@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 0/4] Autounmask changes by Alexander Berntsen
1 From: Alexander Berntsen <alexander@××××××.net>
2
3 Remove the --autounmask option from emerge. Please note that removing
4 the option does not mean that the variable used for keeping track of
5 autounmasking is removed from depgraph.py.
6
7 Signed-off-by: Alexander Berntsen <bernalex@g.o>
8 ---
9 man/emerge.1 | 33 ++++++++++-----------------------
10 pym/_emerge/depgraph.py | 3 +--
11 pym/_emerge/main.py | 9 ---------
12 3 files changed, 11 insertions(+), 34 deletions(-)
13
14 diff --git a/man/emerge.1 b/man/emerge.1
15 index e32bb43..d0a0806 100644
16 --- a/man/emerge.1
17 +++ b/man/emerge.1
18 @@ -336,38 +336,25 @@ invalid input. This helps prevent accidental
19 acceptance of the first choice. This option is
20 intended to be set in the \fBmake.conf\fR(5)
21 \fBEMERGE_DEFAULT_OPTS\fR variable.
22 -.TP
23 -.BR "\-\-autounmask [ y | n ]"
24 -Automatically unmask packages and generate package.use
25 -settings as necessary to satisfy dependencies. This
26 -option is enabled by default. If any configuration
27 -changes are required, then they will be displayed
28 -after the merge list and emerge will immediately
29 -abort. If the displayed configuration changes are
30 -satisfactory, you should copy and paste them into
31 -the specified configuration file(s), or enable the
32 \fB\-\-autounmask\-write\fR option. The
33 \fBEMERGE_DEFAULT_OPTS\fR variable may be used to
34 disable this option by default in \fBmake.conf\fR(5).
35 .TP
36 .BR "\-\-autounmask\-unrestricted\-atoms [ y | n ]"
37 -If \-\-autounmask is enabled, keyword and mask changes
38 -using the \'=\' operator will be written. With this
39 -option, \'>=\' operators will be used whenever possible.
40 -USE and license changes always use the latter behavior.
41 +Keyword and mask changes using the \'=\' operator will be written. With this
42 +option, \'>=\' operators will be used whenever possible. USE and license
43 +changes always use the latter behavior.
44 .TP
45 .BR "\-\-autounmask\-keep\-masks [ y | n ]"
46 -If \-\-autounmask is enabled, no package.unmask or ** keyword changes
47 -will be created. This leads to unsatisfied dependencies if
48 -no other solution exists.
49 +No package.unmask or ** keyword changes will be created if this is activated.
50 +This leads to unsatisfied dependencies if no other solution exists.
51 .TP
52 .BR "\-\-autounmask\-write [ y | n ]"
53 -If \-\-autounmask is enabled, changes are written
54 -to config files, respecting \fBCONFIG_PROTECT\fR and \fB\-\-ask\fR.
55 -If the corresponding package.* is a file, the changes are appended to
56 -it, if it is a directory, changes are written to the lexicographically
57 -last file. This way it is always ensured that the new changes take
58 -precedence over existing changes.
59 +Write required unmask changes to the relevant config files, respecting
60 +\fBCONFIG_PROTECT\fR and \fB\-\-ask\fR. If the corresponding package.* is a
61 +file, the changes are appended to it, if it is a directory, changes are written
62 +to the lexicographically last file. This way it is always ensured that the new
63 +changes take precedence over existing changes.
64 .TP
65 .BR \-\-backtrack=COUNT
66 Specifies an integer number of times to backtrack if
67 diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
68 index a10297a..b0cfc92 100644
69 --- a/pym/_emerge/depgraph.py
70 +++ b/pym/_emerge/depgraph.py
71 @@ -418,7 +418,7 @@ class _dynamic_depgraph_config(object):
72 self._backtrack_infos = {}
73
74 self._buildpkgonly_deps_unsatisfied = False
75 - self._autounmask = depgraph._frozen_config.myopts.get('--autounmask') != 'n'
76 + self._autounmask = True
77 self._success_without_autounmask = False
78 self._traverse_ignored_deps = False
79 self._complete_mode = False
80 @@ -8502,7 +8502,6 @@ def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, sp
81 "\n\nautounmask breakage detected\n\n",
82 noiselevel=-1, level=logging.DEBUG)
83 mydepgraph.display_problems()
84 - myopts["--autounmask"] = "n"
85 mydepgraph = depgraph(settings, trees, myopts, myparams, spinner,
86 frozen_config=frozen_config, allow_backtracking=False)
87 success, favorites = mydepgraph.select_files(myfiles)
88 diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
89 index 52aa9c5..86c0c62 100644
90 --- a/pym/_emerge/main.py
91 +++ b/pym/_emerge/main.py
92 @@ -126,7 +126,6 @@ def insert_optional_args(args):
93 default_arg_opts = {
94 '--alert' : y_or_n,
95 '--ask' : y_or_n,
96 - '--autounmask' : y_or_n,
97 '--autounmask-keep-masks': y_or_n,
98 '--autounmask-unrestricted-atoms' : y_or_n,
99 '--autounmask-write' : y_or_n,
100 @@ -314,11 +313,6 @@ def parse_opts(tmpcmdline, silent=False):
101 "choices" : true_y_or_n
102 },
103
104 - "--autounmask": {
105 - "help" : "automatically unmask packages",
106 - "choices" : true_y_or_n
107 - },
108 -
109 "--autounmask-unrestricted-atoms": {
110 "help" : "write autounmask changes with >= atoms if possible",
111 "choices" : true_y_or_n
112 @@ -693,9 +687,6 @@ def parse_opts(tmpcmdline, silent=False):
113 else:
114 myoptions.ask = None
115
116 - if myoptions.autounmask in true_y:
117 - myoptions.autounmask = True
118 -
119 if myoptions.autounmask_unrestricted_atoms in true_y:
120 myoptions.autounmask_unrestricted_atoms = True
121
122 --
123 1.8.5.5