Index: pym/portage/dbapi/porttree.py =================================================================== --- pym/portage/dbapi/porttree.py (revision 13850) +++ pym/portage/dbapi/porttree.py (working copy) @@ -109,6 +109,11 @@ """this tree will scan a portage directory located at root (passed to init)""" portdbapi_instances = [] _use_mutable = True + + @property + def _categories(self): + return self.mysettings.categories + def __init__(self, porttree_root, mysettings=None): portdbapi.portdbapi_instances.append(self) @@ -119,7 +124,7 @@ from portage import settings self.mysettings = config(clone=settings) self._iuse_implicit = self.mysettings._get_implicit_iuse() - self._categories = 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 Index: bin/repoman =================================================================== --- bin/repoman (revision 13850) +++ bin/repoman (working copy) @@ -512,6 +512,14 @@ logging.info('PORTDIR = "' + portdir + '"') logging.info('PORTDIR_OVERLAY = "%s"' % env['PORTDIR_OVERLAY']) +categories = [] +for path in set([portdir, portdir_overlay]): + categories.extend(portage.util.grabfile( + os.path.join(path, 'profiles', 'categories'))) +repoman_settings.categories = tuple(sorted( + portage.util.stack_lists([categories], incremental=1))) +del categories + portdb.mysettings = repoman_settings root_config = RootConfig(repoman_settings, trees[root], None) # We really only need to cache the metadata that's necessary for visibility