svn path=/main/trunk/; revision=5264
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)
_invalid_atom_chars_regexp = re.compile("[()|?]")
-def isvalidatom(atom):
+def isvalidatom(atom, allow_blockers=False):
"""
Check to see if a depend atom is valid
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)