diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-28 03:41:31 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-28 03:41:31 +0000 |
commit | 7e64644da36c0f464f227e458d237d301d36b040 (patch) | |
tree | 8bec566c4fa2c0b1d2f13137515f4db151ec99e9 /pym/portage.py | |
parent | 5a4ac6363544c5b359b0ec0b27140a555490c4a8 (diff) | |
download | portage-7e64644da36c0f464f227e458d237d301d36b040.tar.gz portage-7e64644da36c0f464f227e458d237d301d36b040.tar.bz2 portage-7e64644da36c0f464f227e458d237d301d36b040.zip |
Try to format the elog message better for bug #211833, separating
paragraphs for easier reading. (trunk r10018)
svn path=/main/branches/2.1.2/; revision=10019
Diffstat (limited to 'pym/portage.py')
-rw-r--r-- | pym/portage.py | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/pym/portage.py b/pym/portage.py index 9b5f0ff54..673e75e03 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -8674,24 +8674,38 @@ class dblink: try: if myebuildpath: if retval != os.EX_OK: + msg_lines = [] 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_lines.extend(wrap(msg, 72)) + msg_lines.append("") + + 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_lines.extend(wrap(msg, 72)) + msg_lines.append("") + + 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." + msg_lines.extend(wrap(msg, 72)) from textwrap import wrap cmd = "source '%s/isolated-functions.sh' ; " % \ PORTAGE_BIN_PATH - for l in wrap(msg, 72): + for l in msg_lines: cmd += "eerror \"%s\" ; " % l portage_exec.spawn(["bash", "-c", cmd], env=self.settings.environ()) |