From: Alexander Berntsen <alexan...@plaimi.net>

Signed-off-by: Alexander Berntsen <berna...@gentoo.org>
---
Options are a bit... odd in Portage source, so please *test* this before
ACKing!

 man/emerge.1            | 3 ++-
 pym/_emerge/depgraph.py | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/man/emerge.1 b/man/emerge.1
index e32bb43..8bf3db1 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -367,7 +367,8 @@ 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.
+precedence over existing changes. This option is automatically enabled with
+\-\-ask.
 .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 a10297a..b6880d5 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -7332,12 +7332,13 @@ 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
+               ask = "--ask" in self._frozen_config.myopts
+               autounmask_write = ask or \
+                               
self._frozen_config.myopts.get("--autounmask-write", "y") == 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.5.5


Reply via email to