From 0308312e1aab84103bd527ed0beb0e5657ca839e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 23 Jun 2008 02:40:38 +0000 Subject: Bug #228935 - Add a new "command not found" build log QA Notice. Thanks to Olivier Huber for the initial patch. svn path=/main/trunk/; revision=10763 --- pym/portage/__init__.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 3741685d8..8d3fa56fd 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -4193,6 +4193,11 @@ def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None): pass else: am_maintainer_mode = [] + + bash_command_not_found = [] + bash_command_not_found_re = re.compile( + r'(.*): line (\d*): (.*): command not found$') + configure_opts_warn = [] configure_opts_warn_re = re.compile( r'^configure: WARNING: Unrecognized options: .*') @@ -4204,6 +4209,10 @@ def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None): if am_maintainer_mode_re.search(line) is not None and \ am_maintainer_mode_exclude_re.search(line) is None: am_maintainer_mode.append(line.rstrip("\n")) + + if bash_command_not_found_re.match(line) is not None: + bash_command_not_found.append(line.rstrip("\n")) + if configure_opts_warn_re.match(line) is not None: configure_opts_warn.append(line.rstrip("\n")) finally: @@ -4234,6 +4243,12 @@ def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None): wrap_width)) _eqawarn(msg) + if bash_command_not_found: + msg = ["QA Notice: command not found:"] + msg.append("") + msg.extend("\t" + line for line in bash_command_not_found) + _eqawarn(msg) + if configure_opts_warn: msg = ["QA Notice: Unrecognized configure options:"] msg.append("") -- cgit v1.2.3-1-g7c22