diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-28 01:29:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-28 01:29:34 +0000 |
commit | 325ab57a9fa754ac8cf6c4acea05e108d455cd3b (patch) | |
tree | 2bc5b2855683424bc8bc041147d565a2f368c763 | |
parent | 13bc88718260f052573074f74d216725db80e62c (diff) | |
download | portage-325ab57a9fa754ac8cf6c4acea05e108d455cd3b.tar.gz portage-325ab57a9fa754ac8cf6c4acea05e108d455cd3b.tar.bz2 portage-325ab57a9fa754ac8cf6c4acea05e108d455cd3b.zip |
* Remove the only remaining sys.exit() calls inside the depgraph class.
* Fix _unknown_internal_error() to work with zero arguments.
(trunk r10005)
svn path=/main/branches/2.1.2/; revision=10010
-rwxr-xr-x | bin/emerge | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/emerge b/bin/emerge index 549a39d3e..034774232 100755 --- a/bin/emerge +++ b/bin/emerge @@ -2696,14 +2696,14 @@ class depgraph(object): portage.writemsg("!!! to aid in the detection of malicious intent.\n\n") portage.writemsg("!!! THIS IS A POSSIBLE INDICATION OF TAMPERED FILES -- CHECK CAREFULLY.\n") portage.writemsg("!!! Affected file: %s\n" % (e), noiselevel=-1) - sys.exit(1) + return 0, myfavorites except portage_exception.InvalidSignature, e: portage.writemsg("\n\n!!! An invalid gpg signature is preventing portage from calculating the\n") portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n") portage.writemsg("!!! to aid in the detection of malicious intent.\n\n") portage.writemsg("!!! THIS IS A POSSIBLE INDICATION OF TAMPERED FILES -- CHECK CAREFULLY.\n") portage.writemsg("!!! Affected file: %s\n" % (e), noiselevel=-1) - sys.exit(1) + return 0, myfavorites except SystemExit, e: raise # Needed else can't exit except Exception, e: @@ -3825,7 +3825,7 @@ class depgraph(object): print print "!!! Note that circular dependencies can often be avoided by temporarily" print "!!! disabling USE flags that trigger optional dependencies." - sys.exit(1) + raise self._unknown_internal_error() # At this point, we've succeeded in selecting one or more nodes, so # it's now safe to reset the prefer_asap and accept_root_node flags @@ -4832,7 +4832,11 @@ class depgraph(object): fakedb[myroot].cpv_inject(pkg) self.spinner.update() - class _unknown_internal_error(portage_exception.PortageException): + class _internal_exception(portage_exception.PortageException): + def __init__(self, value=""): + portage_exception.PortageException.__init__(self, value) + + class _unknown_internal_error(_internal_exception): """ Used by the depgraph internally to terminate graph creation. The specific reason for the failure should have been dumped @@ -4840,7 +4844,7 @@ class depgraph(object): may not be known. """ - class _serialize_tasks_retry(portage_exception.PortageException): + class _serialize_tasks_retry(_internal_exception): """ This is raised by the _serialize_tasks() method when it needs to be called again for some reason. The only case that it's currently |