diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-07-22 18:26:52 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-07-22 18:26:52 +0000 |
commit | a8b91fbb43c2bf4c25410279a3472c674d2c3344 (patch) | |
tree | da14611dcac90c8ab605d5656dee986453367516 | |
parent | fe6e94590a81975460289b67113bb85c931bd4cf (diff) | |
download | portage-a8b91fbb43c2bf4c25410279a3472c674d2c3344.tar.gz portage-a8b91fbb43c2bf4c25410279a3472c674d2c3344.tar.bz2 portage-a8b91fbb43c2bf4c25410279a3472c674d2c3344.zip |
Bug #270040 - Make repoman parse the categories file from the overlay.
svn path=/main/trunk/; revision=13850
-rwxr-xr-x | bin/repoman | 8 | ||||
-rw-r--r-- | pym/portage/dbapi/porttree.py | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/bin/repoman b/bin/repoman index c8f32f4a4..97f24ccd2 100755 --- a/bin/repoman +++ b/bin/repoman @@ -513,6 +513,14 @@ logging.info('Setting paths:') 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 diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 1fd593811..9f427a148 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -124,6 +124,10 @@ class portdbapi(dbapi): "Define self.settings as an alias for self.mysettings, " + \ "for conformity with other dbapi classes.") + @property + def _categories(self): + return self.settings.categories + def __init__(self, porttree_root, mysettings=None): portdbapi.portdbapi_instances.append(self) @@ -133,7 +137,7 @@ class portdbapi(dbapi): else: from portage import settings self.mysettings = config(clone=settings) - 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 |