diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-05-16 20:23:35 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-05-16 20:23:35 +0000 |
commit | 8f168c17dc48aec4b666d408c00595bf80805293 (patch) | |
tree | 99d20e73e26157ff1b340fb3edd81dbcc027e5c8 | |
parent | 852a7e9db646c6437a8bfc85b923bd2eb8bbdfe8 (diff) | |
download | portage-8f168c17dc48aec4b666d408c00595bf80805293.tar.gz portage-8f168c17dc48aec4b666d408c00595bf80805293.tar.bz2 portage-8f168c17dc48aec4b666d408c00595bf80805293.zip |
Fix portage.getmaskingreason() so that it properly stacks all available package.mask files for bug #104000.
svn path=/main/trunk/; revision=3365
-rw-r--r-- | pym/portage.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py index e772c39ee..fbf92191b 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -3565,7 +3565,22 @@ def getmaskingreason(mycpv): raise KeyError("CPV %s does not exist" % mycpv) mycp=mysplit[0]+"/"+mysplit[1] - pmasklines = grablines(settings["PORTDIR"]+"/profiles/package.mask", recursive=1) + # XXX- This is a temporary duplicate of code from the config constructor. + locations = settings.profiles[:] + locations.append(os.path.join(settings["PORTDIR"], "profiles")) + locations.append(os.path.join(settings["PORTAGE_CONFIGROOT"], + USER_CONFIG_PATH.lstrip(os.path.sep))) + for ov in settings["PORTDIR_OVERLAY"].split(): + profdir = os.path.join(os.path.normpath(ov), "profiles") + if os.path.isdir(profdir): + locations.append(profdir) + locations.reverse() + pmasklists = [grablines(os.path.join(x, "package.mask"), recursive=1) for x in locations] + pmasklines = [] + while pmasklists: # stack_lists doesn't preserve order so it can't be used + pmasklines.extend(pmasklists.pop(0)) + del pmasklists + if settings.pmaskdict.has_key(mycp): for x in settings.pmaskdict[mycp]: if mycpv in portdb.xmatch("match-all", x): |