summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-18 22:17:33 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-18 22:17:33 +0000
commit3f40153497a8a623f595290dd30859276ab1fb4c (patch)
tree1268cbf2ad59dd83639cca55166a921d3e7ecdab
parent1525f848f2670a04b3069d5ff9620a1a868a4fcd (diff)
downloadportage-3f40153497a8a623f595290dd30859276ab1fb4c.tar.gz
portage-3f40153497a8a623f595290dd30859276ab1fb4c.tar.bz2
portage-3f40153497a8a623f595290dd30859276ab1fb4c.zip
Only show extra whitespace where there are some news items to display.
svn path=/main/trunk/; revision=6551
-rw-r--r--pym/emerge/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 6e091ab51..9fead5459 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -3730,20 +3730,22 @@ def display_news_notification(settings):
UNREAD_PATH = os.path.join(target_root, NEWS_LIB_PATH, "news")
porttree = portdbapi(porttree_root=settings["PORTDIR"], mysettings=settings)
newsReaderDisplay = False
-
- print
+
for repo in porttree.getRepositories():
unreadItems = checkUpdatedNewsItems(target_root, NEWS_PATH, UNREAD_PATH, repo)
if unreadItems:
+ if not newsReaderDisplay:
+ newsReaderDisplay = True
+ print
print colorize("WARN", " * IMPORTANT:"),
print "%s news items need reading for repository '%s'." % (unreadItems, repo)
- newsReaderDisplay = True
+
if newsReaderDisplay:
print colorize("WARN", " *"),
print "Use " + colorize("GOOD", "eselect news") + " to read news items."
+ print
- print
def post_emerge(settings, mtimedb, retval):
"""
Misc. things to run at the end of a merge session.