Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 517310 | Differences between
and this patch

Collapse All | Expand All

(-)a/pym/_emerge/actions.py (-2 / +8 lines)
Lines 4058-4065 def run_action(emerge_config): Link Here
4058
4058
4059
		# GLEP 42 says to display news *after* an emerge --pretend
4059
		# GLEP 42 says to display news *after* an emerge --pretend
4060
		if "--pretend" not in emerge_config.opts:
4060
		if "--pretend" not in emerge_config.opts:
4061
			display_news_notification(
4061
			uq = UserQuery(emerge_config.opts)
4062
				emerge_config.target_config, emerge_config.opts)
4062
			if display_news_notification(emerge_config.target_config,
4063
								emerge_config.opts) \
4064
				and "--ask" in emerge_config.opts \
4065
				and uq.query("Would you like to read the news items while" \
4066
						"calculating dependencies?",
4067
						'--ask-enter-invalid' in emerge_config.opts) == "Yes":
4068
					subprocess.call(['eselect', 'news', 'read'])
4063
		retval = action_build(emerge_config.target_config.settings,
4069
		retval = action_build(emerge_config.target_config.settings,
4064
			emerge_config.trees, emerge_config.target_config.mtimedb,
4070
			emerge_config.trees, emerge_config.target_config.mtimedb,
4065
			emerge_config.opts, emerge_config.action,
4071
			emerge_config.opts, emerge_config.action,
(-)a/pym/_emerge/post_emerge.py (-2 / +4 lines)
Lines 37-47 def clean_logs(settings): Link Here
37
37
38
def display_news_notification(root_config, myopts):
38
def display_news_notification(root_config, myopts):
39
	if "news" not in root_config.settings.features:
39
	if "news" not in root_config.settings.features:
40
		return
40
		return False
41
	portdb = root_config.trees["porttree"].dbapi
41
	portdb = root_config.trees["porttree"].dbapi
42
	vardb = root_config.trees["vartree"].dbapi
42
	vardb = root_config.trees["vartree"].dbapi
43
	news_counts = count_unread_news(portdb, vardb)
43
	news_counts = count_unread_news(portdb, vardb)
44
	if all(v == 0 for v in news_counts.values()):
45
		return False
44
	display_news_notifications(news_counts)
46
	display_news_notifications(news_counts)
47
	return True
45
48
46
def show_depclean_suggestion():
49
def show_depclean_suggestion():
47
	out = portage.output.EOutput()
50
	out = portage.output.EOutput()
48
- 

Return to bug 517310