1 |
Author: zmedico |
2 |
Date: 2008-04-28 17:20:42 +0000 (Mon, 28 Apr 2008) |
3 |
New Revision: 10022 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/dbapi/vartree.py |
7 |
Log: |
8 |
As suggested by Chr. Schaefer in bug #211833, comment #15, note that |
9 |
removal of the environment.bz2 file is preferred since it may allow the |
10 |
removal phases to execute successfully. |
11 |
|
12 |
|
13 |
Modified: main/trunk/pym/portage/dbapi/vartree.py |
14 |
=================================================================== |
15 |
--- main/trunk/pym/portage/dbapi/vartree.py 2008-04-28 06:00:59 UTC (rev 10021) |
16 |
+++ main/trunk/pym/portage/dbapi/vartree.py 2008-04-28 17:20:42 UTC (rev 10022) |
17 |
@@ -1299,18 +1299,13 @@ |
18 |
try: |
19 |
if myebuildpath: |
20 |
if retval != os.EX_OK: |
21 |
- from portage.elog.messages import eerror |
22 |
- def _eerror(lines): |
23 |
- for l in lines: |
24 |
- eerror(l, phase=ebuild_phase, key=self.mycpv) |
25 |
+ msg_lines = [] |
26 |
msg = ("The '%s' " % ebuild_phase) + \ |
27 |
("phase of the '%s' package " % self.mycpv) + \ |
28 |
("has failed with exit value %s." % retval) |
29 |
- |
30 |
from textwrap import wrap |
31 |
- msg = wrap(msg, 72) |
32 |
- msg.append("") |
33 |
- _eerror(msg) |
34 |
+ msg_lines.extend(wrap(msg, 72)) |
35 |
+ msg_lines.append("") |
36 |
|
37 |
ebuild_name = os.path.basename(myebuildpath) |
38 |
ebuild_dir = os.path.dirname(myebuildpath) |
39 |
@@ -1319,21 +1314,25 @@ |
40 |
("located in the '%s' directory. " \ |
41 |
% ebuild_dir) + \ |
42 |
"If necessary, manually remove " + \ |
43 |
- "the ebuild file and/or the environment.bz2 " + \ |
44 |
- "file located in that directory." |
45 |
- msg = wrap(msg, 72) |
46 |
- msg.append("") |
47 |
- _eerror(msg) |
48 |
+ "the environment.bz2 file and/or the " + \ |
49 |
+ "ebuild file located in that directory." |
50 |
+ msg_lines.extend(wrap(msg, 72)) |
51 |
+ msg_lines.append("") |
52 |
|
53 |
msg = "Removal " + \ |
54 |
- "of the environment.bz2 file will cause " + \ |
55 |
- "the ebuild to be sourced and the eclasses " + \ |
56 |
+ "of the environment.bz2 file is " + \ |
57 |
+ "preferred since it may allow the " + \ |
58 |
+ "removal phases to execute successfully. " + \ |
59 |
+ "The ebuild will be " + \ |
60 |
+ "sourced and the eclasses " + \ |
61 |
"from the current portage tree will be used " + \ |
62 |
"when necessary. Removal of " + \ |
63 |
"the ebuild file will cause the " + \ |
64 |
"removal phases to be skipped entirely." |
65 |
- msg = wrap(msg, 72) |
66 |
- _eerror(msg) |
67 |
+ msg_lines.extend(wrap(msg, 72)) |
68 |
+ from portage.elog.messages import eerror |
69 |
+ for l in msg_lines: |
70 |
+ eerror(l, phase=ebuild_phase, key=self.mycpv) |
71 |
|
72 |
# process logs created during pre/postrm |
73 |
elog_process(self.mycpv, self.settings, phasefilter=filter_unmergephases) |
74 |
|
75 |
-- |
76 |
gentoo-commits@l.g.o mailing list |