summaryrefslogtreecommitdiffstats
path: root/pym/emerge
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-03-20 09:52:15 +0000
committerZac Medico <zmedico@gentoo.org>2007-03-20 09:52:15 +0000
commitffbff569ac5769449d4f106b7b6beb37db03c0f6 (patch)
tree258e86395eaf50ddf8cc885984c2f79ae7eb7f29 /pym/emerge
parenta7a93d92e4391e9c5dfed87afc1f803a9a4a8405 (diff)
downloadportage-ffbff569ac5769449d4f106b7b6beb37db03c0f6.tar.gz
portage-ffbff569ac5769449d4f106b7b6beb37db03c0f6.tar.bz2
portage-ffbff569ac5769449d4f106b7b6beb37db03c0f6.zip
Implement license visibility filtering for GLEP 23, bug #17367, and bug #152593.
svn path=/main/trunk/; revision=6251
Diffstat (limited to 'pym/emerge')
-rw-r--r--pym/emerge/__init__.py28
1 files changed, 22 insertions, 6 deletions
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."