1 |
Author: zmedico |
2 |
Date: 2008-04-28 01:29:34 +0000 (Mon, 28 Apr 2008) |
3 |
New Revision: 10010 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.2/bin/emerge |
7 |
Log: |
8 |
* Remove the only remaining sys.exit() calls inside the depgraph class. |
9 |
* Fix _unknown_internal_error() to work with zero arguments. |
10 |
(trunk r10005) |
11 |
|
12 |
|
13 |
Modified: main/branches/2.1.2/bin/emerge |
14 |
=================================================================== |
15 |
--- main/branches/2.1.2/bin/emerge 2008-04-28 01:22:17 UTC (rev 10009) |
16 |
+++ main/branches/2.1.2/bin/emerge 2008-04-28 01:29:34 UTC (rev 10010) |
17 |
@@ -2696,14 +2696,14 @@ |
18 |
portage.writemsg("!!! to aid in the detection of malicious intent.\n\n") |
19 |
portage.writemsg("!!! THIS IS A POSSIBLE INDICATION OF TAMPERED FILES -- CHECK CAREFULLY.\n") |
20 |
portage.writemsg("!!! Affected file: %s\n" % (e), noiselevel=-1) |
21 |
- sys.exit(1) |
22 |
+ return 0, myfavorites |
23 |
except portage_exception.InvalidSignature, e: |
24 |
portage.writemsg("\n\n!!! An invalid gpg signature is preventing portage from calculating the\n") |
25 |
portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n") |
26 |
portage.writemsg("!!! to aid in the detection of malicious intent.\n\n") |
27 |
portage.writemsg("!!! THIS IS A POSSIBLE INDICATION OF TAMPERED FILES -- CHECK CAREFULLY.\n") |
28 |
portage.writemsg("!!! Affected file: %s\n" % (e), noiselevel=-1) |
29 |
- sys.exit(1) |
30 |
+ return 0, myfavorites |
31 |
except SystemExit, e: |
32 |
raise # Needed else can't exit |
33 |
except Exception, e: |
34 |
@@ -3825,7 +3825,7 @@ |
35 |
print |
36 |
print "!!! Note that circular dependencies can often be avoided by temporarily" |
37 |
print "!!! disabling USE flags that trigger optional dependencies." |
38 |
- sys.exit(1) |
39 |
+ raise self._unknown_internal_error() |
40 |
|
41 |
# At this point, we've succeeded in selecting one or more nodes, so |
42 |
# it's now safe to reset the prefer_asap and accept_root_node flags |
43 |
@@ -4832,7 +4832,11 @@ |
44 |
fakedb[myroot].cpv_inject(pkg) |
45 |
self.spinner.update() |
46 |
|
47 |
- class _unknown_internal_error(portage_exception.PortageException): |
48 |
+ class _internal_exception(portage_exception.PortageException): |
49 |
+ def __init__(self, value=""): |
50 |
+ portage_exception.PortageException.__init__(self, value) |
51 |
+ |
52 |
+ class _unknown_internal_error(_internal_exception): |
53 |
""" |
54 |
Used by the depgraph internally to terminate graph creation. |
55 |
The specific reason for the failure should have been dumped |
56 |
@@ -4840,7 +4844,7 @@ |
57 |
may not be known. |
58 |
""" |
59 |
|
60 |
- class _serialize_tasks_retry(portage_exception.PortageException): |
61 |
+ class _serialize_tasks_retry(_internal_exception): |
62 |
""" |
63 |
This is raised by the _serialize_tasks() method when it needs to |
64 |
be called again for some reason. The only case that it's currently |
65 |
|
66 |
-- |
67 |
gentoo-commits@l.g.o mailing list |