summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-17 05:35:50 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-17 05:35:50 +0000
commit047d6387ae6ae9176ea0a4dbbbbee2fccef152fe (patch)
tree63b5fbf3e54122214ec8c56cca53b977c9803c56
parenta4cf9b140e905917efd747ae97aef9c4204e4a01 (diff)
downloadportage-047d6387ae6ae9176ea0a4dbbbbee2fccef152fe.tar.gz
portage-047d6387ae6ae9176ea0a4dbbbbee2fccef152fe.tar.bz2
portage-047d6387ae6ae9176ea0a4dbbbbee2fccef152fe.zip
Bug #262485 - Handle InvalidAtom from dep_expand().
svn path=/main/trunk/; revision=13116
-rwxr-xr-xbin/quickpkg13
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/quickpkg b/bin/quickpkg
index 92bce027c..80bb98b32 100755
--- a/bin/quickpkg
+++ b/bin/quickpkg
@@ -10,7 +10,7 @@ def quickpkg_main(options, args, eout):
from portage import catsplit, dep_expand, flatten, isvalidatom, xpak
from portage.dep import use_reduce, paren_reduce
from portage.util import ConfigProtect, ensure_dirs
- from portage.exception import InvalidData, InvalidDependString
+ from portage.exception import InvalidAtom, InvalidData, InvalidDependString
from portage.dbapi.vartree import dblink, tar_contents
from portage.checksum import perform_md5
import tarfile
@@ -43,15 +43,16 @@ def quickpkg_main(options, args, eout):
del e
missing.append(arg)
continue
- except InvalidData, e:
- eout.eerror("Invalid atom: %s" % str(e))
- del e
+ except (InvalidAtom, InvalidData):
+ eout.eerror("Invalid atom: %s" % (arg,))
missing.append(arg)
continue
- if not isvalidatom(atom):
- eout.eerror("Invalid atom: %s" % atom)
+ if atom[:1] == '=' and arg[:1] != '=':
+ # dep_expand() allows missing '=' but it's really invalid
+ eout.eerror("Invalid atom: %s" % (arg,))
missing.append(arg)
continue
+
matches = vardb.match(atom)
pkgs_for_arg = 0
for cpv in matches: