summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/package/ebuild/_config/LocationsManager.py8
-rw-r--r--pym/portage/package/ebuild/config.py12
2 files changed, 12 insertions, 8 deletions
diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py
index 2ac2e7492..88f500bd3 100644
--- a/pym/portage/package/ebuild/_config/LocationsManager.py
+++ b/pym/portage/package/ebuild/_config/LocationsManager.py
@@ -24,6 +24,7 @@ class LocationsManager(object):
self.eprefix = eprefix
self.config_root = config_root
self.target_root = target_root
+ self._user_config = local_config
if self.eprefix is None:
self.eprefix = ""
@@ -64,7 +65,7 @@ class LocationsManager(object):
writemsg("!!! ParseError: %s\n" % str(e), noiselevel=-1)
self.profiles = []
- if local_config and self.profiles:
+ if self._user_config and self.profiles:
custom_prof = os.path.join(
self.config_root, CUSTOM_PROFILE_PATH)
if os.path.exists(custom_prof):
@@ -169,7 +170,12 @@ class LocationsManager(object):
self.overlay_profiles.append(profiles_dir)
self.profile_locations = [os.path.join(portdir, "profiles")] + self.overlay_profiles
+ self.profile_and_user_locations = self.profile_locations[:]
+ if self._user_config:
+ self.profile_and_user_locations.append(self.abs_user_config)
+
self.profile_locations = tuple(self.profile_locations)
+ self.profile_and_user_locations = tuple(self.profile_and_user_locations)
self.pmask_locations = [os.path.join(portdir, "profiles")]
self.pmask_locations.extend(self.profiles)
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index c91de9356..e41760b50 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -284,7 +284,7 @@ class config(object):
self.profile_path = locations_manager.profile_path
self.user_profile_dir = locations_manager.user_profile_dir
abs_user_config = locations_manager.abs_user_config
-
+
make_conf = getconfig(
os.path.join(config_root, MAKE_CONF_FILE),
tolerant=tolerant, allow_sourcing=True) or {}
@@ -563,11 +563,7 @@ 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"),
@@ -659,13 +655,15 @@ class config(object):
_local_repo_config(repo_name, repo_opts)
#getting categories from an external file now
- self.categories = [grabfile(os.path.join(x, "categories")) for x in locations]
+ self.categories = [grabfile(os.path.join(x, "categories")) \
+ for x in locations_manager.profile_and_user_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 = [grabfile(os.path.join(x, "arch.list")) \
+ for x in locations_manager.profile_and_user_locations]
archlist = stack_lists(archlist, incremental=1)
self.configdict["conf"]["PORTAGE_ARCHLIST"] = " ".join(archlist)