diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-05-25 05:12:46 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-05-25 05:12:46 +0000 |
commit | d4e1ad76d439e64f0b1d0409ed82b4d99311feb0 (patch) | |
tree | f4aebd113ae20999f31a0b56a37533221b896189 | |
parent | 2bac0a336e693eb7f6aaee2ba540ab33c0414318 (diff) | |
download | portage-d4e1ad76d439e64f0b1d0409ed82b4d99311feb0.tar.gz portage-d4e1ad76d439e64f0b1d0409ed82b4d99311feb0.tar.bz2 portage-d4e1ad76d439e64f0b1d0409ed82b4d99311feb0.zip |
Create Atom instances when validating atoms inside _expand_new_virtuals().
(trunk r10396)
svn path=/main/branches/2.1.2/; revision=10412
-rw-r--r-- | pym/portage.py | 13 |
1 files 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) |