* [gentoo-portage-dev] [PATCH 3/4] emerge: Make --autounmask=y if --ask=y
@ 2014-08-12 9:37 99% ` Alexander Berntsen
0 siblings, 0 replies; 1+ results
From: Alexander Berntsen @ 2014-08-12 9:37 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Alexander Berntsen
From: Alexander Berntsen <alexander@plaimi.net>
Signed-off-by: Alexander Berntsen <bernalex@gentoo.org>
---
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 be52f25..c52cd0a 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -345,10 +345,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 0c6b8e3..bfa63fa 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", "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.5.5
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-08-12 9:37 [gentoo-portage-dev] [PATCH 0/4] Autounmask changes Alexander Berntsen
2014-08-12 9:37 99% ` [gentoo-portage-dev] [PATCH 3/4] emerge: Make --autounmask=y if --ask=y Alexander Berntsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox