From d4e1ad76d439e64f0b1d0409ed82b4d99311feb0 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 25 May 2008 05:12:46 +0000 Subject: Create Atom instances when validating atoms inside _expand_new_virtuals(). (trunk r10396) svn path=/main/branches/2.1.2/; revision=10412 --- pym/portage.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index 768da9b14..2bcbd4e07 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5416,10 +5416,15 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/", newsplit.append(_expand_new_virtuals(x, edebug, mydbapi, mysettings, myroot=myroot, trees=trees, **kwargs)) continue - if portage_dep._dep_check_strict and \ - not isvalidatom(x, allow_blockers=True): - raise portage_exception.ParseError( - "invalid atom: '%s'" % x) + + if not isinstance(x, portage_dep.Atom): + try: + x = portage_dep.Atom(x) + except portage_exception.InvalidAtom: + if portage_dep._dep_check_strict: + raise portage_exception.ParseError( + "invalid atom: '%s'" % x) + mykey = dep_getkey(x) if not mykey.startswith("virtual/"): newsplit.append(x) -- cgit v1.2.3-1-g7c22