diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-04-28 21:46:31 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-04-28 21:46:31 +0000 |
commit | ff4a1a1cc0accaaf106d2ef664c92ec04cb59cad (patch) | |
tree | a301c422db9793b66eec6185fd2cfe95700e86f1 | |
parent | 2b7f738afec20af189382c07cfc611fbf6b0db62 (diff) | |
download | portage-ff4a1a1cc0accaaf106d2ef664c92ec04cb59cad.tar.gz portage-ff4a1a1cc0accaaf106d2ef664c92ec04cb59cad.tar.bz2 portage-ff4a1a1cc0accaaf106d2ef664c92ec04cb59cad.zip |
Fix spelling of "hierarchy" for bug #131582 and raise an exception for cleaner error handling.
svn path=/main/trunk/; revision=3261
-rwxr-xr-x | bin/emerge | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/emerge b/bin/emerge index a982c20e8..88f18d323 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1084,8 +1084,8 @@ class depgraph: print red("*** page for details.") countdown(EMERGE_WARNING_DELAY, "Continuing...") else: - print red("\n*** %s is not in a valid PORTDIR heirarchy or does not exist" % x) - sys.exit(1) + raise portage_exception.PackageNotFound( + "%s is not in a valid portage tree hierarchy or does not exist" % x) if not self.create(["ebuild",portage.root,mykey],None,"--onlydeps" not in myopts): return (0,myfavorites) elif not "--oneshot" in myopts: @@ -3309,7 +3309,11 @@ else: if not ("--quiet" in myopts): print "Calculating dependencies ", sys.stdout.flush() - retval,favorites=mydepgraph.select_files(myfiles) + try: + retval, favorites = mydepgraph.select_files(myfiles) + except portage_exception.PackageNotFound, e: + portage.writemsg("\n!!! %s\n" % str(e)) + sys.exit(1) if not retval: sys.exit(1) if not ("--quiet" in myopts): |