Gentoo Archives: gentoo-commits

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