summaryrefslogtreecommitdiffstats
path: root/pym/portage/__init__.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-15 02:25:05 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-15 02:25:05 +0000
commit22532ec8c8a030d4d513947a2ad12e0eab5e61cd (patch)
tree73560dd0f61931f4492942c450075c78582e29dd /pym/portage/__init__.py
parentf2c053b8516155d9e4b1e866e67c0c24c0702573 (diff)
downloadportage-22532ec8c8a030d4d513947a2ad12e0eab5e61cd.tar.gz
portage-22532ec8c8a030d4d513947a2ad12e0eab5e61cd.tar.bz2
portage-22532ec8c8a030d4d513947a2ad12e0eab5e61cd.zip
Fix new* and do* ebuild helpers to generate consistent error messages for
missing files and generate an appropriate QA Notice when such an error is detected in the build log. Thanks to Diego 'Flameeyes' Pettenò <flameeyes@g.o> for the suggestion. (trunk r11916) svn path=/main/branches/2.1.6/; revision=11917
Diffstat (limited to 'pym/portage/__init__.py')
-rw-r--r--pym/portage/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index ea188d44e..47751a3b6 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4492,6 +4492,9 @@ def _check_build_log(mysettings, out=None):
bash_command_not_found = []
bash_command_not_found_re = re.compile(
r'(.*): line (\d*): (.*): command not found$')
+ helper_missing_file = []
+ helper_missing_file_re = re.compile(
+ r'^!!! (do|new).*: .* does not exist$')
configure_opts_warn = []
configure_opts_warn_re = re.compile(
@@ -4508,6 +4511,9 @@ def _check_build_log(mysettings, out=None):
if bash_command_not_found_re.match(line) is not None:
bash_command_not_found.append(line.rstrip("\n"))
+ if helper_missing_file_re.match(line) is not None:
+ helper_missing_file.append(line.rstrip("\n"))
+
if configure_opts_warn_re.match(line) is not None:
configure_opts_warn.append(line.rstrip("\n"))
finally:
@@ -4544,6 +4550,12 @@ def _check_build_log(mysettings, out=None):
msg.extend("\t" + line for line in bash_command_not_found)
_eqawarn(msg)
+ if helper_missing_file:
+ msg = ["QA Notice: file does not exist:"]
+ msg.append("")
+ msg.extend("\t" + line[4:] for line in helper_missing_file)
+ _eqawarn(msg)
+
if configure_opts_warn:
msg = ["QA Notice: Unrecognized configure options:"]
msg.append("")