summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-28 03:35:41 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-28 03:35:41 +0000
commit2a3295fefbab199a4d7a61b82a321b8d5f4a8a32 (patch)
tree8d4fc2a7d0b199ec07e61f1ac9487cfff3dd77f4 /pym
parent5e49882db981f4985e9cb225f704c756d23d2ce7 (diff)
downloadportage-2a3295fefbab199a4d7a61b82a321b8d5f4a8a32.tar.gz
portage-2a3295fefbab199a4d7a61b82a321b8d5f4a8a32.tar.bz2
portage-2a3295fefbab199a4d7a61b82a321b8d5f4a8a32.zip
Try to format the elog message better for bug #211833, separating
paragraphs for easier reading. svn path=/main/trunk/; revision=10018
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py41
1 files changed, 29 insertions, 12 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 02b148417..a758f2130 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1299,24 +1299,41 @@ 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 = ("The '%s' " % ebuild_phase) + \
("phase of the '%s' package " % self.mycpv) + \
- ("has failed with exit value %s. " % retval) + \
- "The problem occurred while executing " + \
- ("the ebuild located at '%s'. " % myebuildpath) + \
- "If necessary, manually remove the ebuild " + \
- "and/or the environment.bz2 file which " + \
- "is located in the same directory. Removal " + \
+ ("has failed with exit value %s." % retval)
+
+ from textwrap import wrap
+ msg = wrap(msg, 72)
+ msg.append("")
+ _eerror(msg)
+
+ ebuild_name = os.path.basename(myebuildpath)
+ ebuild_dir = os.path.dirname(myebuildpath)
+ msg = "The problem occurred while executing " + \
+ ("the ebuild file named '%s' " % ebuild_name) + \
+ ("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)
+
+ msg = "Removal " + \
"of the environment.bz2 file will cause " + \
- "the ebuild to be sourced and eclasses " + \
+ "the ebuild to be sourced and the eclasses " + \
"from the current portage tree will be used " + \
"when necessary. Removal of " + \
- "the ebuild will cause the execution of " + \
+ "the ebuild file will cause the " + \
"removal phases to be skipped entirely."
- from portage.elog.messages import eerror
- from textwrap import wrap
- for l in wrap(msg, 72):
- eerror(l, phase=ebuild_phase, key=self.mycpv)
+ msg = wrap(msg, 72)
+ _eerror(msg)
# process logs created during pre/postrm
elog_process(self.mycpv, self.settings, phasefilter=filter_unmergephases)