summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-05 20:59:52 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-06 16:26:50 -0700
commit53d850631e35307878839b755ba43091e94327ff (patch)
tree60e08b9ecc738a67112f931afbdbba17a1ab3a93
parentc15dc09471673d3517703ac522a415f130946bf9 (diff)
downloadportage-53d850631e35307878839b755ba43091e94327ff.tar.gz
portage-53d850631e35307878839b755ba43091e94327ff.tar.bz2
portage-53d850631e35307878839b755ba43091e94327ff.zip
Handle negated atoms in getmaskingreason().
-rw-r--r--pym/portage/package/ebuild/getmaskingreason.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage/package/ebuild/getmaskingreason.py
index 83757b798..fa3849378 100644
--- a/pym/portage/package/ebuild/getmaskingreason.py
+++ b/pym/portage/package/ebuild/getmaskingreason.py
@@ -57,12 +57,16 @@ def getmaskingreason(mycpv, metadata=None, settings=None, portdb=None, return_lo
pmask_filename = os.path.join(pmask[0], "package.mask")
for i in range(len(pmask[1])):
l = pmask[1][i].strip()
+ negated_atom = False
try:
l_atom = Atom(l, allow_repo=True,
allow_wildcard=True).without_repo
except InvalidAtom:
l_atom = None
- if l == "":
+ if l[:1] == '-':
+ negated_atom = True
+
+ if negated_atom or not l:
comment = ""
comment_valid = -1
elif l[0] == "#":