From ffbff569ac5769449d4f106b7b6beb37db03c0f6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 20 Mar 2007 09:52:15 +0000 Subject: Implement license visibility filtering for GLEP 23, bug #17367, and bug #152593. svn path=/main/trunk/; revision=6251 --- pym/emerge/__init__.py | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'pym/emerge') diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 2c64acada..5b38f95af 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -1678,16 +1678,32 @@ class depgraph: print "\n!!! "+red("All ebuilds that could satisfy ")+green(xinfo)+red(" have been masked.") print "!!! One of the following masked packages is required to complete your request:" oldcomment = "" + shown_licenses = [] for p in alleb: mreasons = portage.getmaskingstatus(p, settings=pkgsettings, portdb=portdb) print "- "+p+" (masked by: "+", ".join(mreasons)+")" - comment, filename = portage.getmaskingreason(p, - settings=pkgsettings, portdb=portdb, return_location=True) - if comment and comment != oldcomment: - print filename+":" - print comment - oldcomment = comment + if "package.mask" in mreasons: + comment, filename = \ + portage.getmaskingreason(p, + settings=pkgsettings, portdb=portdb, + return_location=True) + if comment and comment != oldcomment: + print filename+":" + print comment + oldcomment = comment + licenses = portdb.aux_get(p, ["LICENSE"])[0] + missing_licenses = [] + for l in pkgsettings.getMissingLicenses( + licenses, p): + l_path = portdb.findLicensePath(l) + if l in shown_licenses: + continue + msg = ("A copy of the '%s' license" + \ + " is located at '%s'.") % (l, l_path) + print msg + print + shown_licenses.append(l) print print "For more information, see MASKED PACKAGES section in the emerge man page or " print "refer to the Gentoo Handbook." -- cgit v1.2.3-1-g7c22