Re: [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask

2014-01-19 Thread Mike Frysinger
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


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask

2014-01-19 Thread Alexander Berntsen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 19/01/14 10:20, Mike Frysinger wrote:
 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.
We should have a news item.

[0]  https://bugs.gentoo.org/show_bug.cgi?id=481578#c14
- -- 
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/

iF4EAREIAAYFAlLbrYEACgkQRtClrXBQc7WUcAEAosYXsLWlWJj1r7vAoVjOD2CG
qncNxjMh2qzfAOPjbPIA/3E6DZ7WztAdNweVLpRdxeeg/LKA8TlUBqjniH8Nvt6B
=5oJv
-END PGP SIGNATURE-



Re: [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask

2014-01-19 Thread Mike Frysinger
On Sunday 19 January 2014 05:48:33 Alexander Berntsen wrote:
 On 19/01/14 10:20, Mike Frysinger wrote:
  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.
 
 We should have a news item.

i don't think so.  i doubt this flag is in common use enough to warrant 
spamming every user of Gentoo.  especially when the people who do use it can 
easily be migrated per my recommendation.  similarly, people who do use this 
flag but miss the news would be broken.

generally speaking, i think it makes a lot more sense to put the notice at the 
point where it matters.
-mike


signature.asc
Description: This is a digitally signed message part.


[gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask

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

Re: [gentoo-portage-dev] [PATCH 2/3] emerge: Rename --autounmask-write to --autounmask

2014-01-18 Thread Mike Gilbert
On Sat, Jan 18, 2014 at 7:21 PM, Alexander Berntsen
alexan...@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?