[gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-18 Thread Alexander Berntsen
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": {
   

Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-19 Thread Pacho Ramos
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 




Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-19 Thread Alexander Berntsen
-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]  
- -- 
Alexander
alexan...@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-



Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-19 Thread Alexander Berntsen
-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
alexan...@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-



Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-19 Thread Pacho Ramos
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]  

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 :( )




Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-19 Thread Alexander Berntsen
-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
alexan...@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-



Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-19 Thread Mike Gilbert
On Sun, Jan 19, 2014 at 5:47 AM, Alexander Berntsen
 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.



Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-19 Thread Alexander Berntsen
-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
alexan...@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-



Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-24 Thread Brian Dolbec
On Sun, 19 Jan 2014 11:47:34 +0100
Alexander Berntsen  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, 



Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-25 Thread Alexander Berntsen
-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
alexan...@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-
>From 3a4cd65e97d7323562fba9669a14f5caa5523eeb Mon Sep 17 00:00:00 2001
From: Alexander Berntsen 
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



Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-27 Thread Alexander Berntsen
-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
alexan...@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-



Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-27 Thread Tom Wijsman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, 25 Jan 2014 20:07:33 +0100
Alexander Berntsen  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  : tom...@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-


Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-27 Thread Tom Wijsman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 27 Jan 2014 23:13:20 +0100
Alexander Berntsen  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:


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  : tom...@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-


Re: [gentoo-portage-dev] [PATCH 1/3] emerge: Deprecate --autounmask

2014-01-27 Thread Alexander Berntsen
-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: 
> 
Oh,
> 
right. I was being stupid. Case matching was enabled, so /message
didn't exactly work. Thanks.
- -- 
Alexander
alexan...@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-