From: Zac Medico Date: Mon, 28 Apr 2008 17:20:42 +0000 (-0000) Subject: As suggested by Chr. Schaefer in bug #211833, comment #15, note that X-Git-Tag: v2.2_pre6~87 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a80693f93d001731a66654bd860aa8cacc65b825;p=portage.git 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 --- 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)