From f906f1973a77e3e1bdb10de277c5404fda1d52e8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 15 Jan 2013 15:31:29 -0500 Subject: [PATCH] emerge: add reference to the portage(5) man page when failing For example, the current licensing error message looks like: The following license changes (package.license) are necessary to proceed: #required by quake3-bin (argument) >=games-fps/quake3-bin-1.32c-r1 GPL-2 Q3AEULA If you don't know much about licensing issues, this error message doesn't help. Instead, give references to the man page so people can easily delve further. Now it looks like: The following license changes are necessary to proceed: (see package.license in the portage(5) man page for more details) #required by quake3-bin (argument) >=games-fps/quake3-bin-1.32c-r1 GPL-2 Q3AEULA Signed-off-by: Mike Frysinger --- pym/_emerge/depgraph.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 96ba87173..92e3b1c9d 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -6576,24 +6576,25 @@ class depgraph(object): if len(roots) > 1: writemsg("\nFor %s:\n" % abs_user_config, noiselevel=-1) + def _writemsg(reason, file): + writemsg(('\nThe following %s are necessary to proceed:\n' + ' (see "%s" in the portage(5) man page for more details)\n') + % (colorize('BAD', reason), file), noiselevel=-1) + if root in unstable_keyword_msg: - writemsg("\nThe following " + colorize("BAD", "keyword changes") + \ - " (package.accept_keywords) are necessary to proceed:\n", noiselevel=-1) + _writemsg('keyword changes', 'package.accept_keywords') writemsg(format_msg(unstable_keyword_msg[root]), noiselevel=-1) if root in p_mask_change_msg: - writemsg("\nThe following " + colorize("BAD", "mask changes") + \ - " (package.unmask) are necessary to proceed:\n", noiselevel=-1) + _writemsg('mask changes', 'package.unmask') writemsg(format_msg(p_mask_change_msg[root]), noiselevel=-1) if root in use_changes_msg: - writemsg("\nThe following " + colorize("BAD", "USE changes") + \ - " (package.use) are necessary to proceed:\n", noiselevel=-1) + _writemsg('USE changes', 'package.use') writemsg(format_msg(use_changes_msg[root]), noiselevel=-1) if root in license_msg: - writemsg("\nThe following " + colorize("BAD", "license changes") + \ - " (package.license) are necessary to proceed:\n", noiselevel=-1) + _writemsg('license changes', 'package.license') writemsg(format_msg(license_msg[root]), noiselevel=-1) protect_obj = {} -- 2.26.2