Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 382716 Details for
Bug 517310
emerge: --ask could ask to read pending news items
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes the bug
0001-Offer-to-read-news-while-calcing-deps-bug-517310.patch (text/plain), 2.01 KB, created by
Alexander Berntsen (RETIRED)
on 2014-08-12 08:17:14 UTC
(
hide
)
Description:
Fixes the bug
Filename:
MIME Type:
Creator:
Alexander Berntsen (RETIRED)
Created:
2014-08-12 08:17:14 UTC
Size:
2.01 KB
patch
obsolete
>From 8ded1df5129ed7e90a068ce302814c947edc41c1 Mon Sep 17 00:00:00 2001 >From: Alexander Berntsen <bernalex@gentoo.org> >Date: Fri, 1 Aug 2014 21:45:51 +0200 >Subject: [PATCH] Offer to read news while calcing deps (bug 517310) > >Signed-off-by: Alexander Berntsen <bernalex@gentoo.org> >--- > pym/_emerge/actions.py | 10 ++++++++-- > pym/_emerge/post_emerge.py | 5 ++++- > 2 files changed, 12 insertions(+), 3 deletions(-) > >diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py >index b935139..45f9167 100644 >--- a/pym/_emerge/actions.py >+++ b/pym/_emerge/actions.py >@@ -4058,8 +4058,14 @@ def run_action(emerge_config): > > # GLEP 42 says to display news *after* an emerge --pretend > if "--pretend" not in emerge_config.opts: >- display_news_notification( >- emerge_config.target_config, emerge_config.opts) >+ uq = UserQuery(emerge_config.opts) >+ if display_news_notification(emerge_config.target_config, >+ emerge_config.opts) \ >+ and "--ask" 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": >+ subprocess.call(['eselect', 'news', 'read']) > retval = action_build(emerge_config.target_config.settings, > emerge_config.trees, emerge_config.target_config.mtimedb, > emerge_config.opts, emerge_config.action, >diff --git a/pym/_emerge/post_emerge.py b/pym/_emerge/post_emerge.py >index d5f1ba5..0cb533c 100644 >--- a/pym/_emerge/post_emerge.py >+++ b/pym/_emerge/post_emerge.py >@@ -37,11 +37,14 @@ def clean_logs(settings): > > def display_news_notification(root_config, myopts): > if "news" not in root_config.settings.features: >- return >+ return False > portdb = root_config.trees["porttree"].dbapi > vardb = root_config.trees["vartree"].dbapi > news_counts = count_unread_news(portdb, vardb) >+ if all(v == 0 for v in news_counts.values()): >+ return False > display_news_notifications(news_counts) >+ return True > > def show_depclean_suggestion(): > out = portage.output.EOutput() >-- >1.8.5.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 517310
:
382716
|
387084