From: Zac Medico Date: Wed, 6 Oct 2010 03:59:52 +0000 (-0700) Subject: Handle negated atoms in getmaskingreason(). X-Git-Tag: v2.2_rc90~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=76b4a2fdd777f7203428a9c8a5a0c434fff55252;p=portage.git Handle negated atoms in getmaskingreason(). --- diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage/package/ebuild/getmaskingreason.py index 044546179..1bc0d8e42 100644 --- a/pym/portage/package/ebuild/getmaskingreason.py +++ b/pym/portage/package/ebuild/getmaskingreason.py @@ -60,12 +60,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] == "#":