From 29825ae82a3a7c51be0b3312e74c9cb0288abbaa Mon Sep 17 00:00:00 2001 From: Sebastian Luther Date: Fri, 23 Jul 2010 15:43:40 +0200 Subject: [PATCH] portage.dep.isvalidatom(): Add support for atoms with wildcards --- pym/portage/dep/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.26.2