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
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]
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):