From 960210b1a0554df0410b12e2d374b7b7da5c6e69 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 27 Aug 2010 15:54:10 -0700 Subject: [PATCH] Fix breakage caused ignorance of /etc/portage/{arch.list,categories} config overrides. --- pym/portage/package/ebuild/config.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 72a7b65e7..b0cdf9eae 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -541,14 +541,6 @@ class config(object): locations_manager.set_port_dirs(self["PORTDIR"], self["PORTDIR_OVERLAY"]) - #getting categories from an external file now - categories = [grabfile(os.path.join(x, "categories")) for x in locations_manager.profile_locations] - category_re = dbapi._category_re - self.categories = tuple(sorted( - x for x in stack_lists(categories, incremental=1) - if category_re.match(x) is not None)) - del categories - #Read all USE related files from profiles and optionally from user config. self._use_manager = UseManager(self.profiles, abs_user_config, user_config=local_config) #Initialize all USE related variables we track ourselves. @@ -571,7 +563,11 @@ class config(object): self._virtuals_manager = VirtualsManager(self.profiles) + locations = list(locations_manager.profile_locations) + if local_config: + locations.append(abs_user_config) + # package.accept_keywords and package.keywords pkgdict = grabdict_package( os.path.join(abs_user_config, "package.keywords"), @@ -662,7 +658,14 @@ class config(object): self._local_repo_configs[repo_name] = \ _local_repo_config(repo_name, repo_opts) - archlist = [grabfile(os.path.join(x, "arch.list")) for x in locations_manager.profile_locations] + #getting categories from an external file now + self.categories = [grabfile(os.path.join(x, "categories")) for x in locations] + category_re = dbapi._category_re + self.categories = tuple(sorted( + x for x in stack_lists(self.categories, incremental=1) + if category_re.match(x) is not None)) + + archlist = [grabfile(os.path.join(x, "arch.list")) for x in locations] archlist = stack_lists(archlist, incremental=1) self.configdict["conf"]["PORTAGE_ARCHLIST"] = " ".join(archlist) -- 2.26.2