summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/vartree.py33
1 files changed, 16 insertions, 17 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index a758f2130..7a2dae37d 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1299,18 +1299,13 @@ class dblink(object):
try:
if myebuildpath:
if retval != os.EX_OK:
- from portage.elog.messages import eerror
- def _eerror(lines):
- for l in lines:
- eerror(l, phase=ebuild_phase, key=self.mycpv)
+ msg_lines = []
msg = ("The '%s' " % ebuild_phase) + \
("phase of the '%s' package " % self.mycpv) + \
("has failed with exit value %s." % retval)
-
from textwrap import wrap
- msg = wrap(msg, 72)
- msg.append("")
- _eerror(msg)
+ msg_lines.extend(wrap(msg, 72))
+ msg_lines.append("")
ebuild_name = os.path.basename(myebuildpath)
ebuild_dir = os.path.dirname(myebuildpath)
@@ -1319,21 +1314,25 @@ class dblink(object):
("located in the '%s' directory. " \
% ebuild_dir) + \
"If necessary, manually remove " + \
- "the ebuild file and/or the environment.bz2 " + \
- "file located in that directory."
- msg = wrap(msg, 72)
- msg.append("")
- _eerror(msg)
+ "the environment.bz2 file and/or the " + \
+ "ebuild file located in that directory."
+ msg_lines.extend(wrap(msg, 72))
+ msg_lines.append("")
msg = "Removal " + \
- "of the environment.bz2 file will cause " + \
- "the ebuild to be sourced and the eclasses " + \
+ "of the environment.bz2 file is " + \
+ "preferred since it may allow the " + \
+ "removal phases to execute successfully. " + \
+ "The ebuild will be " + \
+ "sourced and the eclasses " + \
"from the current portage tree will be used " + \
"when necessary. Removal of " + \
"the ebuild file will cause the " + \
"removal phases to be skipped entirely."
- msg = wrap(msg, 72)
- _eerror(msg)
+ msg_lines.extend(wrap(msg, 72))
+ from portage.elog.messages import eerror
+ for l in msg_lines:
+ eerror(l, phase=ebuild_phase, key=self.mycpv)
# process logs created during pre/postrm
elog_process(self.mycpv, self.settings, phasefilter=filter_unmergephases)