From: Alexander Berntsen <bernalex@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Alexander Berntsen <alexander@plaimi.net>
Subject: [gentoo-portage-dev] [PATCH 3/4] emerge: Make --autounmask=y if --ask=y
Date: Tue, 12 Aug 2014 11:37:14 +0200 [thread overview]
Message-ID: <1407836235-13528-4-git-send-email-bernalex@gentoo.org> (raw)
In-Reply-To: <1407836235-13528-1-git-send-email-bernalex@gentoo.org>
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
next prev parent reply other threads:[~2014-08-12 9:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 9:37 [gentoo-portage-dev] [PATCH 0/4] Autounmask changes Alexander Berntsen
2014-08-12 9:37 ` [gentoo-portage-dev] [PATCH 1/4] emerge: Deprecate --autounmask Alexander Berntsen
2014-08-12 9:37 ` [gentoo-portage-dev] [PATCH 2/4] emerge: Rename --autounmask-write to --autounmask Alexander Berntsen
2014-08-12 9:37 ` Alexander Berntsen [this message]
2014-08-12 9:37 ` [gentoo-portage-dev] [PATCH 4/4] emerge: Let --autounmask=n override other options Alexander Berntsen
2014-08-13 16:06 ` [gentoo-portage-dev] [PATCH 0/4] Autounmask changes Alexander Berntsen
2014-08-13 16:45 ` Brian Dolbec
2014-08-13 16:56 ` Alexander Berntsen
2014-08-13 17:59 ` [gentoo-portage-dev] " Duncan
2014-08-13 18:39 ` Alexander Berntsen
2014-08-13 19:24 ` Wyatt Epp
2014-08-13 19:39 ` Alexander Berntsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1407836235-13528-4-git-send-email-bernalex@gentoo.org \
--to=bernalex@gentoo.org \
--cc=alexander@plaimi.net \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox