diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-02-05 21:27:10 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-02-05 21:27:10 +0000 |
commit | 6795fae1d18cdce69a81123efd91928b6e3e09da (patch) | |
tree | 3e1442f933c447b0bc5b02c6dda232bfea4146f0 /bin/emerge | |
parent | 7be94181e5d5d7e88f0e50912512203d36a8aaf5 (diff) | |
download | portage-6795fae1d18cdce69a81123efd91928b6e3e09da.tar.gz portage-6795fae1d18cdce69a81123efd91928b6e3e09da.tar.bz2 portage-6795fae1d18cdce69a81123efd91928b6e3e09da.zip |
For bug #165382, show a helpful message if an exception is raised from cpv_expand(). (trunk r5897)
svn path=/main/branches/2.1.2/; revision=5898
Diffstat (limited to 'bin/emerge')
-rwxr-xr-x | bin/emerge | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/bin/emerge b/bin/emerge index cabf9e9af..af9362abe 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1803,9 +1803,22 @@ class depgraph: # dep_wordreduce and dep_eval calls. try: portage_dep._dep_check_strict = False - success, atoms = portage.dep_check(depstr, - final_db, pkgsettings, myuse=myuse, - trees=dep_check_trees, myroot=myroot) + try: + success, atoms = portage.dep_check(depstr, + final_db, pkgsettings, myuse=myuse, + trees=dep_check_trees, myroot=myroot) + except Exception, e: + if isinstance(e, SystemExit): + raise + # This is helpful, for example, if a ValueError + # is thrown from cpv_expand due to multiple + # matches (this can happen if an atom lacks a + # category). + show_invalid_depstring_notice( + ("installed", myroot, pkg, "nomerge"), + depstr, str(e)) + del e + raise finally: portage_dep._dep_check_strict = True if not success: |