summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-12 02:46:37 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-12 02:46:37 +0000
commit4590565f93f6c5be8269e0c322960d18929a0fd6 (patch)
tree4a5fb5e08b4a95f8776381ae0fd36a34f2231d27 /pym
parentbacb3f60e57b7fec3e3143b1e9312debceaf3471 (diff)
downloadportage-4590565f93f6c5be8269e0c322960d18929a0fd6.tar.gz
portage-4590565f93f6c5be8269e0c322960d18929a0fd6.tar.bz2
portage-4590565f93f6c5be8269e0c322960d18929a0fd6.zip
Stack package.mask files in a more logical order as specified in bug #133740.
svn path=/main/trunk/; revision=3495
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/pym/portage.py b/pym/portage.py
index f65b43c6c..dafcb4bca 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1150,15 +1150,19 @@ class config:
os.environ.get("PORTDIR_OVERLAY","") == "":
# repoman shouldn't use local settings.
locations = [self["PORTDIR"] + "/profiles"]
+ overlay_profiles = []
else:
abs_user_config = os.path.join(config_root,
USER_CONFIG_PATH.lstrip(os.path.sep))
locations = [os.path.join(self["PORTDIR"], "profiles"),
abs_user_config]
+ overlay_profiles = []
for ov in self["PORTDIR_OVERLAY"].split():
ov = os.path.normpath(ov)
- if os.path.isdir(ov+"/profiles"):
- locations.append(ov+"/profiles")
+ profiles_dir = os.path.join(ov, "profiles")
+ if os.path.isdir(profiles_dir):
+ overlay_profiles.append(profiles_dir)
+ locations += overlay_profiles
if os.environ.get("PORTAGE_CALLER","") == "repoman":
self.pusedict = {}
@@ -1218,9 +1222,13 @@ class config:
self.configdict["conf"]["PORTAGE_ARCHLIST"] = " ".join(archlist)
#package.mask
- pkgmasklines = [grabfile_package(os.path.join(x, "package.mask")) for x in self.profiles]
- for l in locations:
- pkgmasklines.append(grabfile_package(l+os.path.sep+"package.mask", recursive=1))
+ pmask_locations = [os.path.join(self["PORTDIR"], "profiles")] + \
+ self.profiles + overlay_profiles + \
+ [os.path.join(config_root, USER_CONFIG_PATH.lstrip(os.path.sep))]
+ pkgmasklines = []
+ for x in pmask_locations:
+ pkgmasklines.append(grabfile_package(
+ os.path.join(x, "package.mask"), recursive=1))
pkgmasklines = stack_lists(pkgmasklines, incremental=1)
self.pmaskdict = {}