public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: man/, pym/_emerge/
Date: Tue, 21 Oct 2014 23:11:42 +0000 (UTC)	[thread overview]
Message-ID: <1413932817.3a22c197d00b81efeb78fe75359b49316844c2e2.zmedico@gentoo> (raw)

commit:     3a22c197d00b81efeb78fe75359b49316844c2e2
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 20 20:04:28 2014 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Oct 21 23:06:57 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3a22c197

emerge --read-news: prompt only if --ask

This fixes any conditional logic that applies to --ask so that it
also applies to --read-news. For example, emerge will bail out
automatically if --ask is enabled and stdin is not a tty.

X-Gentoo-Bug: 517310
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=517310

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

diff --git a/man/emerge.1 b/man/emerge.1
index 9873ba9..12e8b45 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -716,8 +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.
+.BR "\-\-read\-news [ y | n ]"
+Offer to read news via eselect if there are unread news. This option
+has no effect unless \fB\-\-ask\fR is enabled.
 .TP
 .BR "\-\-rebuild\-if\-new\-slot [ y | n ]"
 Automatically rebuild or reinstall packages when slot/sub\-slot :=

diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 4e8b83b..7672fe6 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -4064,6 +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.opt \
 				and "--read-news" in emerge_config.opts \
 				and uq.query("Would you like to read the news items while " \
 						"calculating dependencies?",


             reply	other threads:[~2014-10-21 23:11 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-21 23:11 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-02-03  3:07 [gentoo-commits] proj/portage:master commit in: man/, pym/_emerge/ Zac Medico
2018-01-30  4:24 Zac Medico
2017-05-14 18:12 Zac Medico
2016-08-08 15:56 Zac Medico
2014-12-07 23:14 Zac Medico
2014-10-20  0:08 Zac Medico
2014-09-24 22:36 Brian Dolbec
2014-06-14 21:46 Alexander Berntsen
2014-06-14 21:46 Alexander Berntsen
2014-06-14 20:58 Alexander Berntsen
2013-07-18 20:25 Zac Medico
2013-07-18 20:23 Zac Medico
2013-02-23 19:17 Zac Medico
2012-12-29 22:35 Zac Medico
2012-12-08  9:25 Zac Medico
2012-11-29  7:53 Zac Medico
2012-10-08 20:30 Zac Medico
2011-12-14  4:47 Zac Medico
2011-10-16 18:58 Zac Medico
2011-10-10 18:05 Zac Medico
2011-09-21 14:00 Zac Medico
2011-09-19 16:03 Zac Medico
2011-09-19 14:15 Zac Medico
2011-09-18 20:16 Zac Medico
2011-07-19  8:38 Zac Medico
2011-06-04 23:32 Zac Medico
2011-06-03  5:40 Zac Medico
2011-05-17  4:31 Zac Medico
2011-05-15 19:20 Zac Medico
2011-05-11 19:04 Zac Medico
2011-04-28 16:16 Zac Medico
2011-04-27 22:07 Zac Medico
2011-04-27 22:03 Zac Medico
2011-04-27 22:00 Zac Medico
2011-03-24 18:18 Zac Medico
2011-03-14 17:52 Zac Medico
2011-02-13  0:24 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=1413932817.3a22c197d00b81efeb78fe75359b49316844c2e2.zmedico@gentoo \
    --to=zmedico@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