Do the "*" check as early as possible in config.getMissingLicenses().
authorZac Medico <zmedico@gentoo.org>
Sun, 25 Mar 2007 07:15:46 +0000 (07:15 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 25 Mar 2007 07:15:46 +0000 (07:15 -0000)
svn path=/main/trunk/; revision=6282

pym/portage/__init__.py

index a7ec412e561ba1e5aec9a2b63b15adecb1dda12d..07437cf2041b4c1922cdae2aa360c3b478a7a44f 100644 (file)
@@ -1764,13 +1764,14 @@ class config:
                @rtype: List
                @return: A list of licenses that have not been accepted.
                """
+               if "*" in self._accept_license:
+                       return []
+               acceptable_licenses = self._accept_license
                cpdict = self._plicensedict.get(dep_getkey(cpv), None)
-               acceptable_licenses = self._accept_license.copy()
                if cpdict:
+                       acceptable_licenses = self._accept_license.copy()
                        for atom in match_to_list(cpv, cpdict.keys()):
                                acceptable_licenses.update(cpdict[atom])
-               if "*" in acceptable_licenses:
-                       return []
                license_struct = portage.dep.paren_reduce(licenses)
                license_struct = portage.dep.use_reduce(
                        license_struct, uselist=uselist)