* [gentoo-portage-dev] [PATCH] emerge: Make --autounmask=y if --ask=y (bug 481578)
@ 2014-08-13 16:42 Alexander Berntsen
0 siblings, 0 replies; only message in thread
From: Alexander Berntsen @ 2014-08-13 16:42 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Alexander Berntsen
From: Alexander Berntsen <alexander@plaimi.net>
Signed-off-by: Alexander Berntsen <bernalex@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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-08-13 16:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-13 16:42 [gentoo-portage-dev] [PATCH] emerge: Make --autounmask=y if --ask=y (bug 481578) Alexander Berntsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox