diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-11-07 22:18:33 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-11-07 22:18:33 +0000 |
commit | 0f644654426cc0f8c989796a3e0ee649c315f7c9 (patch) | |
tree | 81f1c6edce685d4d15ff63396a5a18358b2cbd97 | |
parent | ea1de47bea337f578754db7ce21c1bbd69701f7a (diff) | |
download | portage-0f644654426cc0f8c989796a3e0ee649c315f7c9.tar.gz portage-0f644654426cc0f8c989796a3e0ee649c315f7c9.tar.bz2 portage-0f644654426cc0f8c989796a3e0ee649c315f7c9.zip |
In LinkageMap.rebuild(), immediately raise a CommandNotFound exception if
scanelf is missing since otherwise it will lead to a KeyError later on
from findConsumers or findProviders. This will allow the caller to handle
the CommandNotFound exception if necessary, and skip any findConsumers or
findProviders since they won't be able to return valid results.
svn path=/main/trunk/; revision=11826
-rw-r--r-- | pym/portage/dbapi/vartree.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 5d6e8f578..110bcff4c 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -13,7 +13,8 @@ from portage.data import portage_gid, portage_uid, secpass from portage.dbapi import dbapi from portage.dep import use_reduce, paren_reduce, isvalidatom, \ isjustname, dep_getkey, match_from_list -from portage.exception import InvalidData, InvalidPackageName, \ +from portage.exception import CommandNotFound, \ + InvalidData, InvalidPackageName, \ FileNotFound, PermissionDenied, UnsupportedAPIException from portage.locks import lockdir, unlockdir from portage.output import bold, red, green @@ -281,9 +282,9 @@ class LinkageMap(object): try: proc = subprocess.Popen(args, stdout=subprocess.PIPE) except EnvironmentError, e: - writemsg_level("\nUnable to execute %s: %s\n\n" % (args[0], e), - level=logging.ERROR, noiselevel=-1) - del e + if e.errno != errno.ENOENT: + raise + raise CommandNotFound(args[0]) else: for l in proc.stdout: l = l[3:].rstrip("\n") |