Make atoms with wildcards work in package.license
authorSebastian Luther <SebastianLuther@gmx.de>
Fri, 23 Jul 2010 10:36:08 +0000 (12:36 +0200)
committerZac Medico <zmedico@gentoo.org>
Fri, 23 Jul 2010 16:47:13 +0000 (09:47 -0700)
pym/portage/package/ebuild/config.py

index 3ba8cc311009de842ffab2db4031c33c0d4ee008..2c92f15465579e49993d05a3d17504f395ed5f84 100644 (file)
@@ -1873,7 +1873,13 @@ class config(object):
                @return: A list of licenses that have not been accepted.
                """
                accept_license = self._accept_license
-               cpdict = self._plicensedict.get(cpv_getkey(cpv), None)
+               cp = cpv_getkey(cpv)
+               c, p = catsplit(cp)
+               cpdict = {}
+               cpdict.update(self._plicensedict.get("*/*", {}))
+               cpdict.update(self._plicensedict.get(c+"/*", {}))
+               cpdict.update(self._plicensedict.get("*/"+p, {}))
+               cpdict.update(self._plicensedict.get(cp, {}))
                if cpdict:
                        accept_license = list(self._accept_license)
                        cpv_slot = "%s:%s" % (cpv, metadata["SLOT"])