diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-06-22 05:47:01 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-06-22 05:47:01 +0000 |
commit | 75a3e6d7ac35f768fad6d755383b10f928a880a1 (patch) | |
tree | 7683d55f8fbda2e50e35a6534bc082e69dbc5a40 | |
parent | 29a10d78a8ebe8590d518574887ca1db168033f0 (diff) | |
download | portage-75a3e6d7ac35f768fad6d755383b10f928a880a1.tar.gz portage-75a3e6d7ac35f768fad6d755383b10f928a880a1.tar.bz2 portage-75a3e6d7ac35f768fad6d755383b10f928a880a1.zip |
Clean up the profile masking code. (trunk r6292)
svn path=/main/branches/2.1.2/; revision=6936
-rw-r--r-- | pym/portage.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/pym/portage.py b/pym/portage.py index 5369619d2..1e3923dd7 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6319,9 +6319,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. @@ -6330,12 +6330,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): |