Add an allow_blockers parameter to isvalidatom so that the behavior is optional....
authorZac Medico <zmedico@gentoo.org>
Sun, 10 Dec 2006 20:36:10 +0000 (20:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 10 Dec 2006 20:36:10 +0000 (20:36 -0000)
svn path=/main/trunk/; revision=5264

bin/repoman
pym/portage_dep.py

index 2710f66ca306b5db5cce31948af105ccbcaebcb6..a3a8d96e7ae8aba804673ac61db72c3112037ae5 100755 (executable)
@@ -1103,7 +1103,7 @@ for x in scanlist:
                                        if token in operator_tokens or \
                                                token.endswith("?"):
                                                continue
-                                       if not portage.isvalidatom(token) or \
+                                       if not portage.isvalidatom(token, allow_blockers=True) or \
                                                ":" in token and myaux["EAPI"] == "0":
                                                badsyntax.append("'%s' not a valid atom" % token)
 
index f284ae73a298abe1ffd0df4bddba08f1d08b7110..7a4d76aae03f4103b9c529a7da25720318601966 100644 (file)
@@ -313,7 +313,7 @@ def dep_getslot(mydep):
 
 _invalid_atom_chars_regexp = re.compile("[()|?]")
 
-def isvalidatom(atom):
+def isvalidatom(atom, allow_blockers=False):
        """
        Check to see if a depend atom is valid
 
@@ -333,7 +333,7 @@ def isvalidatom(atom):
        global _invalid_atom_chars_regexp
        if _invalid_atom_chars_regexp.search(atom):
                return 0
-       if atom.startswith("!"):
+       if allow_blockers and atom.startswith("!"):
                atom = atom[1:]
        mycpv_cps = catpkgsplit(dep_getcpv(atom))
        operator = get_operator(atom)