Bug #228935 - Add a new "command not found" build log QA Notice. Thanks to
authorZac Medico <zmedico@gentoo.org>
Mon, 23 Jun 2008 02:40:38 +0000 (02:40 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 23 Jun 2008 02:40:38 +0000 (02:40 -0000)
Olivier Huber for the initial patch.

svn path=/main/trunk/; revision=10763

pym/portage/__init__.py

index 3741685d87f97a4afecf37b0f67cc7775513c799..8d3fa56fd2cf5f34e9a5dfb6e0ff9857205fe26f 100644 (file)
@@ -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("")