diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-02-18 08:22:39 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-02-18 08:22:39 +0000 |
commit | ead265c09529075d9587b11ec012937dd819a5db (patch) | |
tree | 4abaa20df119f273bba45394f9268a6e82fb6297 | |
parent | 1db171453bbe9391be30d954d07b78e9a53e1ad3 (diff) | |
download | portage-ead265c09529075d9587b11ec012937dd819a5db.tar.gz portage-ead265c09529075d9587b11ec012937dd819a5db.tar.bz2 portage-ead265c09529075d9587b11ec012937dd819a5db.zip |
For bug #163990, warn about ebuilds with invalid categories and do not allow them to be installed.
svn path=/main/trunk/; revision=5988
-rw-r--r-- | pym/portage/dbapi/porttree.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 7293b2e43..953ffdcff 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -32,7 +32,7 @@ class portdbapi(dbapi): else: from portage import settings self.mysettings = config(clone=settings) - + self._categories = set(self.mysettings.categories) # This is strictly for use in aux_get() doebuild calls when metadata # is generated by the depend phase. It's safest to use a clone for # this purpose because doebuild makes many changes to the config @@ -478,6 +478,7 @@ class portdbapi(dbapi): def cp_list(self, mycp, use_cache=1, mytree=None): mysplit = mycp.split("/") + invalid_category = mysplit[0] not in self._categories d={} if mytree: mytrees = [mytree] @@ -493,6 +494,10 @@ class portdbapi(dbapi): os.path.join(oroot, mycp, x), noiselevel=-1) continue d[mysplit[0]+"/"+pf] = None + if invalid_category and d: + writemsg(("\n!!! '%s' has a category that is not listed in " + \ + "/etc/portage/categories\n") % mycp, noiselevel=-1) + return [] return d.keys() def freeze(self): |