From: Sebastian Luther Date: Fri, 23 Jul 2010 13:43:40 +0000 (+0200) Subject: portage.dep.isvalidatom(): Add support for atoms with wildcards X-Git-Tag: v2.2_rc68~467 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=29825ae82a3a7c51be0b3312e74c9cb0288abbaa;p=portage.git portage.dep.isvalidatom(): Add support for atoms with wildcards --- diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index bd5cfcc86..c58a83e44 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -938,7 +938,7 @@ _atom_re = re.compile('^(?P(?:' + '(?P' + _cp + '))(:' + _slot + ')?)(' + _use + ')?$', re.VERBOSE) _atom_wildcard_re = re.compile('(?P((' + _cat + '|\*)/(' + _pkg + '|\*)))$') -def isvalidatom(atom, allow_blockers=False): +def isvalidatom(atom, allow_blockers=False, allow_wildcard=False): """ Check to see if a depend atom is valid @@ -957,7 +957,7 @@ def isvalidatom(atom, allow_blockers=False): """ try: if not isinstance(atom, Atom): - atom = Atom(atom) + atom = Atom(atom, allow_wildcard=allow_wildcard) if not allow_blockers and atom.blocker: return False return True