diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-11-15 02:23:43 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-11-15 02:23:43 +0000 |
commit | f18540f507de4b434c0dfccbcea747654c32b431 (patch) | |
tree | 74217d628380712cbae387ffc27ad1ecd9138850 /pym | |
parent | 420a428b6e59afd5e5743c8ac9b19a281410e9f1 (diff) | |
download | portage-f18540f507de4b434c0dfccbcea747654c32b431.tar.gz portage-f18540f507de4b434c0dfccbcea747654c32b431.tar.bz2 portage-f18540f507de4b434c0dfccbcea747654c32b431.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.
svn path=/main/trunk/; revision=11916
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 8c8c99ebc..8dcd8a0c8 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -4502,6 +4502,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( @@ -4518,6 +4521,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: @@ -4554,6 +4560,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("") |