From: "Alexander Berntsen" <bernalex@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/, man/
Date: Mon, 29 Sep 2014 22:12:36 +0000 (UTC) [thread overview]
Message-ID: <1412028729.7d605312d48ae5f7755f640ef78c97b424399bd0.bernalex@gentoo> (raw)
commit: 7d605312d48ae5f7755f640ef78c97b424399bd0
Author: Alexander Berntsen <bernalex <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 29 10:20:03 2014 +0000
Commit: Alexander Berntsen <bernalex <AT> gentoo <DOT> org>
CommitDate: Mon Sep 29 22:12:09 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7d605312
Implement --read-news (off by default)
Turn off news-reading by default when --ask, and instead make it an
option --read-news.
Apparently making --ask a bit more interactive was "goddamn stupid" and
ruined the lives of several Gentoo developers. Props to Michał who
predicted this all along.
ACKed-by: Brian Dolbec <dolsen <AT> gentoo.org>
Signed-off-by: Alexander Berntsen <bernalex <AT> gentoo.org>
---
man/emerge.1 | 3 +++
pym/_emerge/actions.py | 2 +-
pym/_emerge/main.py | 13 +++++++++++++
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/man/emerge.1 b/man/emerge.1
index a2cb3f6..2264b58 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -716,6 +716,9 @@ Disable the warning message that's shown prior to
to be set in the \fBmake.conf\fR(5)
\fBEMERGE_DEFAULT_OPTS\fR variable.
.TP
+.BR "\-\-read-news [ y | n ]"
+Offer to read news via eselect if there are unread news.
+.TP
.BR "\-\-rebuild\-if\-new\-slot [ y | n ]"
Automatically rebuild or reinstall packages when slot/sub\-slot :=
operator dependencies can be satisfied by a newer slot, so that
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 9036810..4e8b83b 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -4064,7 +4064,7 @@ def run_action(emerge_config):
uq = UserQuery(emerge_config.opts)
if display_news_notification(emerge_config.target_config,
emerge_config.opts) \
- and "--ask" in emerge_config.opts \
+ and "--read-news" in emerge_config.opts \
and uq.query("Would you like to read the news items while " \
"calculating dependencies?",
'--ask-enter-invalid' in emerge_config.opts) == "Yes":
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 52aa9c5..3883f72 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -146,6 +146,7 @@ def insert_optional_args(args):
'--quiet' : y_or_n,
'--quiet-build' : y_or_n,
'--quiet-fail' : y_or_n,
+ '--read-news' : y_or_n,
'--rebuild-if-new-slot': y_or_n,
'--rebuild-if-new-rev' : y_or_n,
'--rebuild-if-new-ver' : y_or_n,
@@ -557,6 +558,12 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : true_y_or_n,
},
+ "--read-news": {
+ "help" : "offer to read unread news via eselect",
+ "choices" : true_y_or_n
+ },
+
+
"--rebuild-if-new-slot": {
"help" : ("Automatically rebuild or reinstall packages when slot/sub-slot := "
"operator dependencies can be satisfied by a newer slot, so that "
@@ -803,6 +810,12 @@ def parse_opts(tmpcmdline, silent=False):
if myoptions.quiet_fail in true_y:
myoptions.quiet_fail = 'y'
+ if myoptions.read_news in true_y:
+ myoptions.read_news = True
+ else:
+ myoptions.read_news = None
+
+
if myoptions.rebuild_if_new_slot in true_y:
myoptions.rebuild_if_new_slot = 'y'
next reply other threads:[~2014-09-29 22:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 22:12 Alexander Berntsen [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-10-21 23:21 [gentoo-commits] proj/portage:master commit in: pym/_emerge/, man/ Zac Medico
2016-01-04 10:38 Alexander Berntsen
2016-02-02 10:10 Alexander Berntsen
2016-02-02 20:53 Alexander Berntsen
2018-02-03 3:11 Zac Medico
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=1412028729.7d605312d48ae5f7755f640ef78c97b424399bd0.bernalex@gentoo \
--to=bernalex@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-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