summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-28 17:20:42 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-28 17:20:42 +0000
commita80693f93d001731a66654bd860aa8cacc65b825 (patch)
treec13f9472df4fe1a38bd534b412a43524cb87a9c6
parent7e4bfa520f240f5c6859369af9d0c18a226bcc12 (diff)
downloadportage-a80693f93d001731a66654bd860aa8cacc65b825.tar.gz
portage-a80693f93d001731a66654bd860aa8cacc65b825.tar.bz2
portage-a80693f93d001731a66654bd860aa8cacc65b825.zip
As suggested by Chr. Schaefer in bug #211833, comment #15, note that
removal of the environment.bz2 file is preferred since it may allow the removal phases to execute successfully. svn path=/main/trunk/; revision=10022
-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)