repoman: handle categories for multiple masters
authorZac Medico <zmedico@gentoo.org>
Sat, 15 Oct 2011 18:58:26 +0000 (11:58 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 15 Oct 2011 18:58:26 +0000 (11:58 -0700)
Also, copy repoman_settings.categories to each individual
profile's dep_settings.categories attribute, in order to ensure
that portdbapi.cp_list() uses the correct category set.

bin/repoman

index b80b783866a3b79fed34782787d96d0717c4e3ff..cdf1001bc551f77e1014dfdaf64598b40b335007 100755 (executable)
@@ -677,7 +677,7 @@ logging.info('PORTDIR_OVERLAY = "%s"' % env['PORTDIR_OVERLAY'])
 env['FEATURES'] = env.get('FEATURES', '') + ' -unknown-features-warn'
 
 categories = []
-for path in set([portdir, repodir]):
+for path in repo_info.eclass_db.porttrees:
        categories.extend(portage.util.grabfile(
                os.path.join(path, 'profiles', 'categories')))
 repoman_settings.categories = frozenset(
@@ -2000,6 +2000,7 @@ for x in effective_scanlist:
                                                local_config=False,
                                                _unmatched_removal=options.unmatched_removal,
                                                env=env, _eprefix=eprefix)
+                                       dep_settings.categories = repoman_settings.categories
                                        if options.without_mask:
                                                dep_settings._mask_manager = \
                                                        copy.deepcopy(dep_settings._mask_manager)