to the \fBworld\fR file at the end, so that they are considered for
later updating.
.TP
+.BR \-\-check\-news
+Scan all repositories for relevant unread GLEP 42 news items, and display
+how many are found. See \fIhttp://www.gentoo.org/proj/en/glep/glep-0042.html\fR.
+.TP
.BR \-\-clean
Cleans up the system by examining the installed packages and removing older
packages. This is accomplished by looking at each installed package and separating
import textwrap
import platform
import portage
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.news:count_unread_news,display_news_notifications',
+)
from portage import os
from portage import _encodings
from portage import _unicode_decode
global options, shortmapping
actions = frozenset([
- "clean", "config", "depclean", "help",
+ "clean", "check-news", "config", "depclean", "help",
"info", "list-sets", "metadata",
"prune", "regen", "search",
"sync", "unmerge", "version",
if myaction == "list-sets":
writemsg_stdout("".join("%s\n" % s for s in sorted(root_config.sets)))
return os.EX_OK
+ elif myaction == "check-news":
+ news_counts = count_unread_news(
+ root_config.trees["porttree"].dbapi,
+ root_config.trees["vartree"].dbapi)
+ if list(filter(None, news_counts.values())):
+ display_news_notifications(news_counts)
+ elif "--quiet" not in myopts:
+ print("", colorize("GOOD", "*"), "No news items were found.")
+ return os.EX_OK
ensure_required_sets(trees)
emerge_cmd + ("--version",),
emerge_cmd + ("--info",),
emerge_cmd + ("--info", "--verbose"),
+ emerge_cmd + ("--list-sets",),
+ emerge_cmd + ("--check-news",),
rm_cmd + ("-rf", cachedir),
rm_cmd + ("-rf", cachedir_pregen),
emerge_cmd + ("--regen",),