* [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
@ 2014-01-19 0:21 Alexander Berntsen
2014-01-19 0:21 ` [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask Alexander Berntsen
` (2 more replies)
0 siblings, 3 replies; 22+ messages in thread
From: Alexander Berntsen @ 2014-01-19 0:21 UTC (permalink / raw
To: gentoo-portage-dev
Remove the --autounmask option from emerge. Please note that removing
the option does not mean that the variable used for keeping track of
autounmasking is not removed from depgraph.py.
---
man/emerge.1 | 33 ++++++++++-----------------------
pym/_emerge/depgraph.py | 3 +--
pym/_emerge/main.py | 9 ---------
3 files changed, 11 insertions(+), 34 deletions(-)
diff --git a/man/emerge.1 b/man/emerge.1
index c59185f..58bdc94 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -322,38 +322,25 @@ invalid input. This helps prevent accidental
acceptance of the first choice. This option is
intended to be set in the \fBmake.conf\fR(5)
\fBEMERGE_DEFAULT_OPTS\fR variable.
-.TP
-.BR "\-\-autounmask [ y | n ]"
-Automatically unmask packages and generate package.use
-settings as necessary to satisfy dependencies. This
-option is enabled by default. If any configuration
-changes are required, then they will be displayed
-after the merge list and emerge will immediately
-abort. If the displayed configuration changes are
-satisfactory, you should copy and paste them into
-the specified configuration file(s), or enable the
\fB\-\-autounmask\-write\fR option. The
\fBEMERGE_DEFAULT_OPTS\fR variable may be used to
disable this option by default in \fBmake.conf\fR(5).
.TP
.BR "\-\-autounmask\-unrestricted\-atoms [ y | n ]"
-If \-\-autounmask is enabled, keyword and mask changes
-using the \'=\' operator will be written. With this
-option, \'>=\' operators will be used whenever possible.
-USE and license changes always use the latter behavior.
+Keyword and mask changes using the \'=\' operator will be written. With this
+option, \'>=\' operators will be used whenever possible. USE and license
+changes always use the latter behavior.
.TP
.BR "\-\-autounmask\-keep\-masks [ y | n ]"
-If \-\-autounmask is enabled, no package.unmask or ** keyword changes
-will be created. This leads to unsatisfied dependencies if
-no other solution exists.
+No package.unmask or ** keyword changes will be created if this is activated.
+This leads to unsatisfied dependencies if no other solution exists.
.TP
.BR "\-\-autounmask\-write [ y | n ]"
-If \-\-autounmask is enabled, changes are written
-to config files, respecting \fBCONFIG_PROTECT\fR and \fB\-\-ask\fR.
-If the corresponding package.* is a file, the changes are appended to
-it, if it is a directory, changes are written to the lexicographically
-last file. This way it is always ensured that the new changes take
-precedence over existing changes.
+Write required unmask changes to the relevant config files, respecting
+\fBCONFIG_PROTECT\fR and \fB\-\-ask\fR. If the corresponding package.* is a
+file, the changes are appended to it, if it is a directory, changes are written
+to the lexicographically last file. This way it is always ensured that the new
+changes take precedence over existing changes.
.TP
.BR \-\-backtrack=COUNT
Specifies an integer number of times to backtrack if
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 7b77edc..9fdfa43 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -427,7 +427,7 @@ class _dynamic_depgraph_config(object):
self._backtrack_infos = {}
self._buildpkgonly_deps_unsatisfied = False
- self._autounmask = depgraph._frozen_config.myopts.get('--autounmask') != 'n'
+ self._autounmask = True
self._success_without_autounmask = False
self._traverse_ignored_deps = False
self._complete_mode = False
@@ -7971,7 +7971,6 @@ def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, sp
"\n\nautounmask breakage detected\n\n",
noiselevel=-1, level=logging.DEBUG)
mydepgraph.display_problems()
- myopts["--autounmask"] = "n"
mydepgraph = depgraph(settings, trees, myopts, myparams, spinner,
frozen_config=frozen_config, allow_backtracking=False)
success, favorites = mydepgraph.select_files(myfiles)
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 89413a9..fc73ef7 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -123,7 +123,6 @@ def insert_optional_args(args):
default_arg_opts = {
'--ask' : y_or_n,
- '--autounmask' : y_or_n,
'--autounmask-keep-masks': y_or_n,
'--autounmask-unrestricted-atoms' : y_or_n,
'--autounmask-write' : y_or_n,
@@ -303,11 +302,6 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : true_y_or_n
},
- "--autounmask": {
- "help" : "automatically unmask packages",
- "choices" : true_y_or_n
- },
-
"--autounmask-unrestricted-atoms": {
"help" : "write autounmask changes with >= atoms if possible",
"choices" : true_y_or_n
@@ -673,9 +667,6 @@ def parse_opts(tmpcmdline, silent=False):
else:
myoptions.ask = None
- if myoptions.autounmask in true_y:
- myoptions.autounmask = True
-
if myoptions.autounmask_unrestricted_atoms in true_y:
myoptions.autounmask_unrestricted_atoms = True
--
1.8.3.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask
2014-01-19 0:21 [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask Alexander Berntsen
@ 2014-01-19 0:21 ` Alexander Berntsen
2014-01-19 2:14 ` Mike Gilbert
2014-01-19 9:20 ` Mike Frysinger
2014-01-19 0:21 ` [gentoo-portage-dev] [PATCH 3/3] emerge: Make --autounmask=y if --ask=y Alexander Berntsen
2014-01-19 8:01 ` [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask Pacho Ramos
2 siblings, 2 replies; 22+ messages in thread
From: Alexander Berntsen @ 2014-01-19 0:21 UTC (permalink / raw
To: gentoo-portage-dev
Rename --autounmask-write to --autounmask. Please note that removing the
option does not mean that the variable used for keeping track of
autounmask writing is not removed from depgraph.py.
---
man/emerge.1 | 19 +++++++++++--------
pym/_emerge/depgraph.py | 4 ++--
pym/_emerge/main.py | 18 +++++++++---------
3 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/man/emerge.1 b/man/emerge.1
index 58bdc94..e23d1b4 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -322,10 +322,20 @@ invalid input. This helps prevent accidental
acceptance of the first choice. This option is
intended to be set in the \fBmake.conf\fR(5)
\fBEMERGE_DEFAULT_OPTS\fR variable.
-\fB\-\-autounmask\-write\fR option. The
+\fB\-\-autounmask\fR option. The
\fBEMERGE_DEFAULT_OPTS\fR variable may be used to
disable this option by default in \fBmake.conf\fR(5).
.TP
+.BR "\-\-autounmask [ y | n ]"
+Write required unmask changes to the relevant config files, respecting
+\fBCONFIG_PROTECT\fR. If invoked together with \fB\-\-ask\fR, emerge will
+prompt you to write the changes. If invoked along with \fB\-\-pretend\fR,
+emerge will merely output the required changes and not make any of them by
+itself. If the corresponding package.* is a file, the changes are appended to
+it, if it is a directory, changes are written to the lexicographically last
+file. This way it is always ensured that the new changes take precedence over
+existing changes.
+.TP
.BR "\-\-autounmask\-unrestricted\-atoms [ y | n ]"
Keyword and mask changes using the \'=\' operator will be written. With this
option, \'>=\' operators will be used whenever possible. USE and license
@@ -335,13 +345,6 @@ changes always use the latter behavior.
No package.unmask or ** keyword changes will be created if this is activated.
This leads to unsatisfied dependencies if no other solution exists.
.TP
-.BR "\-\-autounmask\-write [ y | n ]"
-Write required unmask changes to the relevant config files, respecting
-\fBCONFIG_PROTECT\fR and \fB\-\-ask\fR. If the corresponding package.* is a
-file, the changes are appended to it, if it is a directory, changes are written
-to the lexicographically last file. This way it is always ensured that the new
-changes take precedence over existing changes.
-.TP
.BR \-\-backtrack=COUNT
Specifies an integer number of times to backtrack if
dependency calculation fails due to a conflict or an
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 9fdfa43..5b4b723 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -6806,7 +6806,7 @@ class depgraph(object):
(using CONFIG_PROTECT). The message includes the comments and the changes.
"""
- autounmask_write = self._frozen_config.myopts.get("--autounmask-write", "n") == True
+ autounmask_write = self._frozen_config.myopts.get("--autounmask", "n") == True
autounmask_unrestricted_atoms = \
self._frozen_config.myopts.get("--autounmask-unrestricted-atoms", "n") == True
quiet = "--quiet" in self._frozen_config.myopts
@@ -7168,7 +7168,7 @@ class depgraph(object):
chk_updated_cfg_files(root,
[os.path.join(os.sep, USER_CONFIG_PATH)])
elif not pretend and not autounmask_write and roots:
- writemsg("\nUse --autounmask-write to write changes to config files (honoring\n"
+ writemsg("\nUse --autounmask to write changes to config files (honoring\n"
"CONFIG_PROTECT). Carefully examine the list of proposed changes,\n"
"paying special attention to mask or keyword changes that may expose\n"
"experimental or unstable packages.\n",
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index fc73ef7..247317d 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -123,9 +123,9 @@ def insert_optional_args(args):
default_arg_opts = {
'--ask' : y_or_n,
+ '--autounmask' : y_or_n,
'--autounmask-keep-masks': y_or_n,
'--autounmask-unrestricted-atoms' : y_or_n,
- '--autounmask-write' : y_or_n,
'--buildpkg' : y_or_n,
'--complete-graph' : y_or_n,
'--deep' : valid_integers,
@@ -302,6 +302,11 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : true_y_or_n
},
+ "--autounmask": {
+ "help" : "automatically unmask packages",
+ "choices" : true_y_or_n
+ },
+
"--autounmask-unrestricted-atoms": {
"help" : "write autounmask changes with >= atoms if possible",
"choices" : true_y_or_n
@@ -312,11 +317,6 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : true_y_or_n
},
- "--autounmask-write": {
- "help" : "write changes made by --autounmask to disk",
- "choices" : true_y_or_n
- },
-
"--accept-properties": {
"help":"temporarily override ACCEPT_PROPERTIES",
"action":"store"
@@ -667,15 +667,15 @@ def parse_opts(tmpcmdline, silent=False):
else:
myoptions.ask = None
+ if myoptions.autounmask in true_y:
+ myoptions.autounmask = True
+
if myoptions.autounmask_unrestricted_atoms in true_y:
myoptions.autounmask_unrestricted_atoms = True
if myoptions.autounmask_keep_masks in true_y:
myoptions.autounmask_keep_masks = True
- if myoptions.autounmask_write in true_y:
- myoptions.autounmask_write = True
-
if myoptions.buildpkg in true_y:
myoptions.buildpkg = True
--
1.8.3.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask
2014-01-19 0:21 ` [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask Alexander Berntsen
@ 2014-01-19 2:14 ` Mike Gilbert
2014-01-19 2:15 ` Alec Warner
2014-01-19 10:18 ` Alexander Berntsen
2014-01-19 9:20 ` Mike Frysinger
1 sibling, 2 replies; 22+ messages in thread
From: Mike Gilbert @ 2014-01-19 2:14 UTC (permalink / raw
To: gentoo-portage-dev
On Sat, Jan 18, 2014 at 7:21 PM, Alexander Berntsen
<alexander@plaimi.net> wrote:
> Rename --autounmask-write to --autounmask. Please note that removing the
> option does not mean that the variable used for keeping track of
> autounmask writing is not removed from depgraph.py.
Ok, so how do I tell portage to suggest autounmask entries without
writing them to /etc/portage? Is that feature gone after your changes?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask
2014-01-19 2:14 ` Mike Gilbert
@ 2014-01-19 2:15 ` Alec Warner
2014-01-19 10:18 ` Alexander Berntsen
1 sibling, 0 replies; 22+ messages in thread
From: Alec Warner @ 2014-01-19 2:15 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 603 bytes --]
It should be emerge --pretend --autounmask, but I'm not sure he implemented
that bit.
-A
On Sat, Jan 18, 2014 at 6:14 PM, Mike Gilbert <floppym@gentoo.org> wrote:
> On Sat, Jan 18, 2014 at 7:21 PM, Alexander Berntsen
> <alexander@plaimi.net> wrote:
> > Rename --autounmask-write to --autounmask. Please note that removing the
> > option does not mean that the variable used for keeping track of
> > autounmask writing is not removed from depgraph.py.
>
> Ok, so how do I tell portage to suggest autounmask entries without
> writing them to /etc/portage? Is that feature gone after your changes?
>
>
[-- Attachment #2: Type: text/html, Size: 1035 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask
2014-01-19 2:14 ` Mike Gilbert
2014-01-19 2:15 ` Alec Warner
@ 2014-01-19 10:18 ` Alexander Berntsen
1 sibling, 0 replies; 22+ messages in thread
From: Alexander Berntsen @ 2014-01-19 10:18 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 19/01/14 03:14, Mike Gilbert wrote:
> Ok, so how do I tell portage to suggest autounmask entries without
> writing them to /etc/portage? Is that feature gone after your
> changes?
"emerge --ask foo" would suggest them, and prompt you to write them
for you.
- --
Alexander
alexander@plaimi.net
http://plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlLbpm0ACgkQRtClrXBQc7XeGQD+Ng7PQm9+YweOAdRRdmKR692a
4EwqoeOZUK8OyhDIzEwA/2tJ4MTHmJRxlfYvf4IFVhmeHU/Nq46UE0eNp1sl7YBD
=S7Rd
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask
2014-01-19 0:21 ` [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask Alexander Berntsen
2014-01-19 2:14 ` Mike Gilbert
@ 2014-01-19 9:20 ` Mike Frysinger
2014-01-19 10:48 ` Alexander Berntsen
1 sibling, 1 reply; 22+ messages in thread
From: Mike Frysinger @ 2014-01-19 9:20 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Alexander Berntsen
[-- Attachment #1: Type: Text/Plain, Size: 318 bytes --]
On Saturday 18 January 2014 19:21:11 Alexander Berntsen wrote:
> Rename --autounmask-write to --autounmask.
typically when we delete/rename an option, we give users a heads up. that
means a cycle where the old option exists but emits a warning before switching
to the new one. then we can delete it.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-portage-dev] [PATCH 3/3] emerge: Make --autounmask=y if --ask=y
2014-01-19 0:21 [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask Alexander Berntsen
2014-01-19 0:21 ` [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask Alexander Berntsen
@ 2014-01-19 0:21 ` Alexander Berntsen
2014-01-19 8:01 ` [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask Pacho Ramos
2 siblings, 0 replies; 22+ messages in thread
From: Alexander Berntsen @ 2014-01-19 0:21 UTC (permalink / raw
To: gentoo-portage-dev
---
man/emerge.1 | 9 +++++----
pym/_emerge/depgraph.py | 5 +++--
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/man/emerge.1 b/man/emerge.1
index e23d1b4..52f8ed7 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -331,10 +331,11 @@ Write required unmask changes to the relevant config files, respecting
\fBCONFIG_PROTECT\fR. If invoked together with \fB\-\-ask\fR, emerge will
prompt you to write the changes. If invoked along with \fB\-\-pretend\fR,
emerge will merely output the required changes and not make any of them by
-itself. If the corresponding package.* is a file, the changes are appended to
-it, if it is a directory, changes are written to the lexicographically last
-file. This way it is always ensured that the new changes take precedence over
-existing changes.
+itself. This option is enabled by default if are running emerge with
+\fB\-\-ask\fR or \fB\-\-pretend\fR, and disabled by default elsewise. If the
+corresponding package.* is a file, the changes are appended to it, if it is a
+directory, changes are written to the lexicographically last file. This way it
+is always ensured that the new changes take precedence over existing changes.
.TP
.BR "\-\-autounmask\-unrestricted\-atoms [ y | n ]"
Keyword and mask changes using the \'=\' operator will be written. With this
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 5b4b723..e8b680d 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -6806,12 +6806,13 @@ class depgraph(object):
(using CONFIG_PROTECT). The message includes the comments and the changes.
"""
- autounmask_write = self._frozen_config.myopts.get("--autounmask", "n") == True
+ ask = "--ask" in self._frozen_config.myopts
+ autounmask_write = ask or \
+ self._frozen_config.myopts.get("--autounmask", "n") == True
autounmask_unrestricted_atoms = \
self._frozen_config.myopts.get("--autounmask-unrestricted-atoms", "n") == True
quiet = "--quiet" in self._frozen_config.myopts
pretend = "--pretend" in self._frozen_config.myopts
- ask = "--ask" in self._frozen_config.myopts
enter_invalid = '--ask-enter-invalid' in self._frozen_config.myopts
def check_if_latest(pkg):
--
1.8.3.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-19 0:21 [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask Alexander Berntsen
2014-01-19 0:21 ` [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask Alexander Berntsen
2014-01-19 0:21 ` [gentoo-portage-dev] [PATCH 3/3] emerge: Make --autounmask=y if --ask=y Alexander Berntsen
@ 2014-01-19 8:01 ` Pacho Ramos
2014-01-19 10:23 ` Alexander Berntsen
2 siblings, 1 reply; 22+ messages in thread
From: Pacho Ramos @ 2014-01-19 8:01 UTC (permalink / raw
To: gentoo-portage-dev
El dom, 19-01-2014 a las 01:21 +0100, Alexander Berntsen escribió:
> Remove the --autounmask option from emerge. Please note that removing
> the option does not mean that the variable used for keeping track of
> autounmasking is not removed from depgraph.py.
If I understand the change correctly (I don't know much about python
but, but per the diff, looks like you are dropping the option and making
the code behave like it's always 'True'), seems that you are forcing
autounmask to be on always.
Even if I use this in all my systems (passing it in by default emerge
opts), I think we still need a way to disable it sometimes. For example,
I need that when portage shows me really strange error messages. I
remember this was an old bug related with backtracking, but can't find
it just now (it should contains quite a few duplicates) :S
I am referring to that kind of errors that reports the wrong package as
being the culprit of some conflict
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-19 8:01 ` [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask Pacho Ramos
@ 2014-01-19 10:23 ` Alexander Berntsen
2014-01-19 10:26 ` Alexander Berntsen
2014-01-19 10:32 ` Pacho Ramos
0 siblings, 2 replies; 22+ messages in thread
From: Alexander Berntsen @ 2014-01-19 10:23 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 19/01/14 09:01, Pacho Ramos wrote:
> If I understand the change correctly (I don't know much about
> python but, but per the diff, looks like you are dropping the
> option and making the code behave like it's always 'True'), seems
> that you are forcing autounmask to be on always.
You do not understand it correctly. It makes --ask imply
- --autounmask-write.
> Even if I use this in all my systems (passing it in by default
> emerge opts), I think we still need a way to disable it sometimes.
There is. Regardless of whether you mean (current) --autounmask or
(current) --autounmask-write behaviour.
emerge --ask foo # This won't -write
emerge --autounmask --pretend foo # Same as the above
emerge --ask --pretend foo # This won't even offer the suggestions
Please see [0] for more information.
[0] <https://bugs.gentoo.org/show_bug.cgi?id=481578#c10>
- --
Alexander
alexander@plaimi.net
http://plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlLbp50ACgkQRtClrXBQc7UOqgEAkTdpMbn4b0ndvME8QT1+rdVa
VkYYLucfV8C3MG6DIJwBALW3zZlQeG/a/dHNdo+KuEnp/xnsUDacI+q0xP1GF3Ak
=6VxI
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-19 10:23 ` Alexander Berntsen
@ 2014-01-19 10:26 ` Alexander Berntsen
2014-01-19 10:32 ` Pacho Ramos
1 sibling, 0 replies; 22+ messages in thread
From: Alexander Berntsen @ 2014-01-19 10:26 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 19/01/14 11:23, Alexander Berntsen wrote:
> emerge --ask foo # This won't -write emerge --autounmask --pretend
> foo # Same as the above
Sorry, the comments here are imprecise. The first-mentioned will
*prompt* the user for writing the changes. The second-mentioned will
merely print out the suggestions.
- --
Alexander
alexander@plaimi.net
http://plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlLbqD4ACgkQRtClrXBQc7Xq2gEAnZm6ZFdSykzpv6sOO/Wg6KFh
cbbijfaQXGmmrXM2gJQA/AklPbjJGgJ/TxfSydymu3gTo7UutkLwawpea+dCcAEf
=7Q4V
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-19 10:23 ` Alexander Berntsen
2014-01-19 10:26 ` Alexander Berntsen
@ 2014-01-19 10:32 ` Pacho Ramos
2014-01-19 10:47 ` Alexander Berntsen
1 sibling, 1 reply; 22+ messages in thread
From: Pacho Ramos @ 2014-01-19 10:32 UTC (permalink / raw
To: gentoo-portage-dev
El dom, 19-01-2014 a las 11:23 +0100, Alexander Berntsen escribió:
> On 19/01/14 09:01, Pacho Ramos wrote:
> > If I understand the change correctly (I don't know much about
> > python but, but per the diff, looks like you are dropping the
> > option and making the code behave like it's always 'True'), seems
> > that you are forcing autounmask to be on always.
> You do not understand it correctly. It makes --ask imply
> --autounmask-write.
Ah, nice :)
>
> > Even if I use this in all my systems (passing it in by default
> > emerge opts), I think we still need a way to disable it sometimes.
> There is. Regardless of whether you mean (current) --autounmask or
> (current) --autounmask-write behaviour.
>
> emerge --ask foo # This won't -write
> emerge --autounmask --pretend foo # Same as the above
> emerge --ask --pretend foo # This won't even offer the suggestions
>
> Please see [0] for more information.
>
> [0] <https://bugs.gentoo.org/show_bug.cgi?id=481578#c10>
Then, I guess "-ap" would be the equivalent of --autounmask=n and should
behave in the same way, right? In that case, no problem (even if I think
we should document this since using --ask --pretend at the same time
doesn't look so intuitive to me :( )
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-19 10:32 ` Pacho Ramos
@ 2014-01-19 10:47 ` Alexander Berntsen
2014-01-19 16:49 ` Mike Gilbert
2014-01-25 3:10 ` Brian Dolbec
0 siblings, 2 replies; 22+ messages in thread
From: Alexander Berntsen @ 2014-01-19 10:47 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 19/01/14 11:32, Pacho Ramos wrote:
> Then, I guess "-ap" would be the equivalent of --autounmask=n and
> should behave in the same way, right? In that case, no problem
> (even if I think we should document this since using --ask
> --pretend at the same time doesn't look so intuitive to me :( )
Since --ask implies --autounmask, the following are all the same for
autounmask-purposes:
emerge --pretend --ask foo
emerge --pretend --autounmask foo
As for "emerge --autounmask=n foo", This will actually spit out the
suggestions, just not ask to write them.
While playing with this, I discovered a possible misbehaviour though.
With "emerge --ask --autounmask=n", --ask takes precedence to
- --autounmask=n. Maybe it shouldn't. But this can always be changed.
- --
Alexander
alexander@plaimi.net
http://plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlLbrUYACgkQRtClrXBQc7WpKAD/fK7gLyN6P9CZ4XE9UGBBdG7y
ugfFlnTXMYo//zsXu8cA/isRW4G+sk7L1g1xOp60y9XT7DZ8rEn8bw7LNoFKzIrH
=VOy3
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-19 10:47 ` Alexander Berntsen
@ 2014-01-19 16:49 ` Mike Gilbert
2014-01-19 18:27 ` Alexander Berntsen
2014-01-25 19:07 ` Alexander Berntsen
2014-01-25 3:10 ` Brian Dolbec
1 sibling, 2 replies; 22+ messages in thread
From: Mike Gilbert @ 2014-01-19 16:49 UTC (permalink / raw
To: gentoo-portage-dev
On Sun, Jan 19, 2014 at 5:47 AM, Alexander Berntsen
<alexander@plaimi.net> wrote:
> On 19/01/14 11:32, Pacho Ramos wrote:
>> Then, I guess "-ap" would be the equivalent of --autounmask=n and
>> should behave in the same way, right? In that case, no problem
>> (even if I think we should document this since using --ask
>> --pretend at the same time doesn't look so intuitive to me :( )
> Since --ask implies --autounmask, the following are all the same for
> autounmask-purposes:
>
> emerge --pretend --ask foo
> emerge --pretend --autounmask foo
>
> As for "emerge --autounmask=n foo", This will actually spit out the
> suggestions, just not ask to write them.
>
> While playing with this, I discovered a possible misbehaviour though.
> With "emerge --ask --autounmask=n", --ask takes precedence to
> - --autounmask=n. Maybe it shouldn't. But this can always be changed.
Please give me a way to shut off autounmask entirely no mater what
other options I pass to emerge. Tying it to --ask with no way to
disable it is not acceptable.
Generating the unmask entries can cause quite a performance hit, and
often causes portage to come up with nonsensical solutions when an
error message would be much more helpful.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-19 16:49 ` Mike Gilbert
@ 2014-01-19 18:27 ` Alexander Berntsen
2014-01-25 19:07 ` Alexander Berntsen
1 sibling, 0 replies; 22+ messages in thread
From: Alexander Berntsen @ 2014-01-19 18:27 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 19/01/14 17:49, Mike Gilbert wrote:
> Please give me a way to shut off autounmask entirely no mater what
> other options I pass to emerge. Tying it to --ask with no way to
> disable it is not acceptable.
- --autounmask=n should do this. I messed up something. Sorry. I wrote
this months ago, and don't have it all in my head right now. I will
fix this next weekend.
- --
Alexander
alexander@plaimi.net
http://plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlLcGSUACgkQRtClrXBQc7VehAEAhPIv0r7WZMOQSzzctvsDjkEF
CwmLlLNb8tzb52E/Ng0A/AxQueneyo2uK1HktnU9YPOAYmi6ziAImKS4SNYS5bF6
=ysNQ
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-19 16:49 ` Mike Gilbert
2014-01-19 18:27 ` Alexander Berntsen
@ 2014-01-25 19:07 ` Alexander Berntsen
2014-01-27 22:00 ` Tom Wijsman
1 sibling, 1 reply; 22+ messages in thread
From: Alexander Berntsen @ 2014-01-25 19:07 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 766 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 19/01/14 17:49, Mike Gilbert wrote:
> Please give me a way to shut off autounmask entirely no mater what
> other options I pass to emerge.
Here you go.
I don't have time to figure out how send-email's --in-reply-to option
works right now. If someone wants to tell me how to find the
Message-ID (using Thunderbird), I would be grateful for the effort.
- --
Alexander
alexander@plaimi.net
http://plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlLkC3UACgkQRtClrXBQc7Un7gD8DFjXDZzWypJiCD7GFdXIiGEg
Gbzl2rZb3b9JOssNC8sA/3JdcsQI315GJ8szKYBsadmcZVC/k2/gZE8ZnW2qXtK+
=SJ9h
-----END PGP SIGNATURE-----
[-- Attachment #2: 0001-emerge-Let-autounmask-n-override-other-options.patch --]
[-- Type: text/x-patch, Size: 1266 bytes --]
From 3a4cd65e97d7323562fba9669a14f5caa5523eeb Mon Sep 17 00:00:00 2001
From: Alexander Berntsen <alexander@plaimi.net>
Date: Sat, 25 Jan 2014 20:03:00 +0100
Subject: [PATCH] emerge: Let --autounmask=n override other options
---
pym/_emerge/depgraph.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index e8b680d..2d32190 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -427,7 +427,8 @@ class _dynamic_depgraph_config(object):
self._backtrack_infos = {}
self._buildpkgonly_deps_unsatisfied = False
- self._autounmask = True
+ self._autounmask = \
+ depgraph._frozen_config.myopts.get("--autounmask") != 'n'
self._success_without_autounmask = False
self._traverse_ignored_deps = False
self._complete_mode = False
@@ -6808,7 +6809,7 @@ class depgraph(object):
ask = "--ask" in self._frozen_config.myopts
autounmask_write = ask or \
- self._frozen_config.myopts.get("--autounmask", "n") == True
+ self._frozen_config.myopts.get("--autounmask", "y")
autounmask_unrestricted_atoms = \
self._frozen_config.myopts.get("--autounmask-unrestricted-atoms", "n") == True
quiet = "--quiet" in self._frozen_config.myopts
--
1.8.3.2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-25 19:07 ` Alexander Berntsen
@ 2014-01-27 22:00 ` Tom Wijsman
2014-01-27 22:13 ` Alexander Berntsen
0 siblings, 1 reply; 22+ messages in thread
From: Tom Wijsman @ 2014-01-27 22:00 UTC (permalink / raw
To: alexander; +Cc: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sat, 25 Jan 2014 20:07:33 +0100
Alexander Berntsen <alexander@plaimi.net> wrote:
> I don't have time to figure out how send-email's --in-reply-to option
> works right now. If someone wants to tell me how to find the
> Message-ID (using Thunderbird), I would be grateful for the effort.
A first idea from looking at search engine results is through the menu
"View" and then click "Message Source"; maybe there's some faster way
around, changing the options of what header fields to show perhaps?
- --
With kind regards,
Tom Wijsman (TomWij)
Gentoo Developer
E-mail address : TomWij@gentoo.org
GPG Public Key : 6D34E57D
GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQEcBAEBAgAGBQJS5tb3AAoJEJWyH81tNOV95tEH/jEC73XI2EE6Q4XK6JpEHAqD
nv9entByGTwF94iG5rKiFyJvaxW3gIBUjg67urc7KvzPJPfZphHPqKWTaam3qIc2
5zzzqFeGKPBV8jbvZ5/9X9Jlv9+ROmtbjBiN3Q8b0RcRiExqiU9iA8VRcUcR2+tL
HesgKJaT2b8xGTRCIFmpOnBBClDev0inIz3mOC0S7tjS/uqFZBwMn1NvrjtfOcJ+
uCxPYuIj3S2F3Q9O928lJyvZtWmLQ/nW9sZoyetyTFQI6FtXRihGm8/baZOyYnit
Oz2EK1IpvbdJwgfFqYzLEbz6gBYpiWY4exiVcr1EovdOiCw6DpaprA+dZs3OtQY=
=4geW
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-27 22:00 ` Tom Wijsman
@ 2014-01-27 22:13 ` Alexander Berntsen
2014-01-27 22:26 ` Tom Wijsman
0 siblings, 1 reply; 22+ messages in thread
From: Alexander Berntsen @ 2014-01-27 22:13 UTC (permalink / raw
To: Tom Wijsman; +Cc: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 27/01/14 23:00, Tom Wijsman wrote:
> A first idea from looking at search engine results is through the
> menu "View" and then click "Message Source"; maybe there's some
> faster way around, changing the options of what header fields to
> show perhaps?
That was my first hunch, but there is no field like this in Mike's
email. On yours (the email I'm replying to) and others, there is such
a field though. The email I'm replying to has the ID "Message-ID:
<20140127230019.0d787808@TOMWIJ-GENTOO>".
- --
Alexander
alexander@plaimi.net
http://plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlLm2gAACgkQRtClrXBQc7VXwAD/QJr2RE6dQeWW2vUxnFCY/yUp
3a34izKWHoMjCid3KxAA/R6AfxOTiPJYMV/c4l0FR64qyk1yKlwWJPFIM9caTFru
=/5Wf
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-27 22:13 ` Alexander Berntsen
@ 2014-01-27 22:26 ` Tom Wijsman
2014-01-27 22:54 ` Alexander Berntsen
0 siblings, 1 reply; 22+ messages in thread
From: Tom Wijsman @ 2014-01-27 22:26 UTC (permalink / raw
To: alexander; +Cc: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 27 Jan 2014 23:13:20 +0100
Alexander Berntsen <alexander@plaimi.net> wrote:
> On 27/01/14 23:00, Tom Wijsman wrote:
> > A first idea from looking at search engine results is through the
> > menu "View" and then click "Message Source"; maybe there's some
> > faster way around, changing the options of what header fields to
> > show perhaps?
> That was my first hunch, but there is no field like this in Mike's
> email. On yours (the email I'm replying to) and others, there is such
> a field though. The email I'm replying to has the ID "Message-ID:
> <20140127230019.0d787808@TOMWIJ-GENTOO>".
It's somewhere near the end of the header:
Message-ID:
<CAJ0EP408ncVB5zMF92upG+eQ0K2JT8WJbchm3XJFzrWj=c2_sw@mail.gmail.com>
If we fill that in in GMANE's Message ID finder it yields his mail:
http://news.gmane.org/find-root.php?message_id=CAJ0EP408ncVB5zMF92upG%2beQ0K2JT8WJbchm3XJFzrWj%3dc2%5fsw%40mail.gmail.com
- --
With kind regards,
Tom Wijsman (TomWij)
Gentoo Developer
E-mail address : TomWij@gentoo.org
GPG Public Key : 6D34E57D
GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQEcBAEBAgAGBQJS5t0RAAoJEJWyH81tNOV9AwkIAKBXdmfbx3DMNYwldONf3Mq4
nqH4RQavnrUQ6IYodFAgpAQG+BEgsHPu9TK6EBf8BHxpj0vOZHpmy1T/h/ISqlbf
V4vYgDplV6Dc8buApoTXiCDKlQ4KiGf0x3zhrWdh7mDlLK+8nT0+9lmfXRP3Ut6A
of+D0hSo6tsSzVTZjC4ko3wBxudySDAcz5UfpAP2LO/kCysN1fEOPUyddfACs9G1
+bDLQ6Ovm8b5IBL6P9LX0Z/+D+jDANjTZI8EmxwDrmi/bqsuWnQpEOoUy4UC7DJm
YdRjiTJoZ9ApR41rLgokDZuTsjvDOcOxpas+jW2SVjdIoQhDdKYNKW01AN7pUAI=
=298c
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-27 22:26 ` Tom Wijsman
@ 2014-01-27 22:54 ` Alexander Berntsen
0 siblings, 0 replies; 22+ messages in thread
From: Alexander Berntsen @ 2014-01-27 22:54 UTC (permalink / raw
To: Tom Wijsman; +Cc: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 27/01/14 23:26, Tom Wijsman wrote:
> It's somewhere near the end of the header:
>
> Message-ID:
> <CAJ0EP408ncVB5zMF92upG+eQ0K2JT8WJbchm3XJFzrWj=c2_sw@mail.gmail.com>
Oh,
>
right. I was being stupid. Case matching was enabled, so /message
didn't exactly work. Thanks.
- --
Alexander
alexander@plaimi.net
http://plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlLm454ACgkQRtClrXBQc7UINgD8DUF8MIyIxMnNjZZjfufioAzk
npqa1IZHqahr/ELZeRQA/igIJohmmJ8YTuwp0uTC3NGYT7QidOIPtsH/3RbFW0NA
=qp0x
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask
2014-01-19 10:47 ` Alexander Berntsen
2014-01-19 16:49 ` Mike Gilbert
@ 2014-01-25 3:10 ` Brian Dolbec
1 sibling, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2014-01-25 3:10 UTC (permalink / raw
To: gentoo-portage-dev
On Sun, 19 Jan 2014 11:47:34 +0100
Alexander Berntsen <alexander@plaimi.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 19/01/14 11:32, Pacho Ramos wrote:
> > Then, I guess "-ap" would be the equivalent of --autounmask=n and
> > should behave in the same way, right? In that case, no problem
> > (even if I think we should document this since using --ask
> > --pretend at the same time doesn't look so intuitive to me :( )
> Since --ask implies --autounmask, the following are all the same for
> autounmask-purposes:
>
> emerge --pretend --ask foo
> emerge --pretend --autounmask foo
>
> As for "emerge --autounmask=n foo", This will actually spit out the
> suggestions, just not ask to write them.
>
> While playing with this, I discovered a possible misbehaviour though.
> With "emerge --ask --autounmask=n", --ask takes precedence to
> - --autounmask=n. Maybe it shouldn't. But this can always be changed.
> - --
> Alexander
As I recall in portage's code, -p -s ignored and removed from the
options when --ask is invoked since it implies --pretend behavior, but
allows emerge to continue with an yes answer rather than have to start
the dep calc's over again.
So, I agree that having to have both --ask and --pretend to get the
same functionality is just bad and not intuitive.
Brian Dolbec, <dolsen>
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2014-01-27 22:54 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-19 0:21 [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask Alexander Berntsen
2014-01-19 0:21 ` [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask Alexander Berntsen
2014-01-19 2:14 ` Mike Gilbert
2014-01-19 2:15 ` Alec Warner
2014-01-19 10:18 ` Alexander Berntsen
2014-01-19 9:20 ` Mike Frysinger
2014-01-19 10:48 ` Alexander Berntsen
2014-01-20 5:45 ` Mike Frysinger
2014-01-19 0:21 ` [gentoo-portage-dev] [PATCH 3/3] emerge: Make --autounmask=y if --ask=y Alexander Berntsen
2014-01-19 8:01 ` [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask Pacho Ramos
2014-01-19 10:23 ` Alexander Berntsen
2014-01-19 10:26 ` Alexander Berntsen
2014-01-19 10:32 ` Pacho Ramos
2014-01-19 10:47 ` Alexander Berntsen
2014-01-19 16:49 ` Mike Gilbert
2014-01-19 18:27 ` Alexander Berntsen
2014-01-25 19:07 ` Alexander Berntsen
2014-01-27 22:00 ` Tom Wijsman
2014-01-27 22:13 ` Alexander Berntsen
2014-01-27 22:26 ` Tom Wijsman
2014-01-27 22:54 ` Alexander Berntsen
2014-01-25 3:10 ` Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox