diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-02-05 21:24:01 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-02-05 21:24:01 +0000 |
commit | 2c2c1002597f1e337227e6cfab74657fd57504df (patch) | |
tree | 8fa76885500c064505da23942afd53938bb67956 | |
parent | 99174ebb16afb44446d8504c01e3be67583a67c4 (diff) | |
download | portage-2c2c1002597f1e337227e6cfab74657fd57504df.tar.gz portage-2c2c1002597f1e337227e6cfab74657fd57504df.tar.bz2 portage-2c2c1002597f1e337227e6cfab74657fd57504df.zip |
For bug #165382, show a helpful message if an exception is raised from cpv_expand().
svn path=/main/trunk/; revision=5897
-rwxr-xr-x | bin/emerge | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/bin/emerge b/bin/emerge index f19c29f49..e37f4bb6d 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1804,9 +1804,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: |