summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-30 04:51:11 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-30 04:51:11 +0000
commitaefc782f00075875dc61900e39b3e39a4e6be707 (patch)
tree4f1240263da7c6b30475870abb2ed30cfded6704
parentcache the result of --suffix to reduce testing overhead as suggested by Mr_Bo... (diff)
downloadportage-multirepo-aefc782f00075875dc61900e39b3e39a4e6be707.tar.gz
portage-multirepo-aefc782f00075875dc61900e39b3e39a4e6be707.tar.bz2
portage-multirepo-aefc782f00075875dc61900e39b3e39a4e6be707.zip
Clean up the profile masking code. (branches/2.1.2 r6936)
svn path=/main/branches/2.1.2.9/; revision=7479
-rw-r--r--pym/portage.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/pym/portage.py b/pym/portage.py
index af8643d1..e9d52118 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6259,9 +6259,9 @@ class portdbapi(dbapi):
except ValueError:
pass
- revmaskdict=self.mysettings.prevmaskdict
- if revmaskdict.has_key(mycp):
- for x in revmaskdict[mycp]:
+ profile_atoms = self.mysettings.prevmaskdict.get(mycp)
+ if profile_atoms:
+ for x in profile_atoms:
#important: only match against the still-unmasked entries...
#notice how we pass "newlist" to the xmatch() call below....
#Without this, ~ deps in the packages files are broken.
@@ -6270,12 +6270,8 @@ class portdbapi(dbapi):
#error in packages file; print warning and continue:
print "emerge: visible(): profile packages entry \""+x+"\" is invalid, ignoring..."
continue
- pos=0
- while pos<len(newlist):
- if newlist[pos] not in mymatches:
- del newlist[pos]
- else:
- pos += 1
+ newlist = [cpv for cpv in newlist if cpv in mymatches]
+
return newlist
def gvisible(self,mylist):