commit:     b39e1edca0ee73f29b5513ab30f00da14d1291bc
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Dec 20 06:36:38 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 20 14:04:12 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b39e1edc

ebuild: command not found QA: don't skip QA warnings that come from ./configure

Down through the twisting trail of history, we find a 2008 bug report
and commit 930bbbf31c10265b27825426f1eff6d7f17395e6, which disabled
detecting "command not found" in ./configure scripts with the following
rationale:

> This is actually a false positive. I'll fix it to filter out the ones that 
> are generated by configure scripts.

As far as I can tell it wasn't a false positive though. Looking up the
source code for that old project reveals no indication that it can
misfire in "expected" ways. More generally, this obscures real issues in
configure scripts -- why should configure scripts be special here? --
which have *zero* guarantee of resulting in failure. Anecdotally, they
usually do not.

Whatever the underlying issue is, it's *definitely* an upstream bug and
*almost certainly* indicates that there may be situations where the
project miscompiles against expectations.

Bug: https://bugs.gentoo.org/245716
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Closes: https://github.com/gentoo/portage/pull/1210
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/package/ebuild/doebuild.py | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/lib/portage/package/ebuild/doebuild.py 
b/lib/portage/package/ebuild/doebuild.py
index e651f28d06..b10bbaf30d 100644
--- a/lib/portage/package/ebuild/doebuild.py
+++ b/lib/portage/package/ebuild/doebuild.py
@@ -2275,7 +2275,6 @@ def _check_build_log(mysettings, out=None):
         r"(.*): line (\d*): (.*): command not found$"
     )
     dash_command_not_found_re = re.compile(r"(.*): (\d+): (.*): not found$")
-    command_not_found_exclude_re = re.compile(r"/configure: line ")
     helper_missing_file = []
     helper_missing_file_re = re.compile(r"^!!! (do|new).*: .* does not exist$")
 
@@ -2379,16 +2378,10 @@ def _check_build_log(mysettings, out=None):
             ):
                 am_maintainer_mode.append(line.rstrip("\n"))
 
-            if (
-                bash_command_not_found_re.match(line) is not None
-                and command_not_found_exclude_re.search(line) is None
-            ):
+            if bash_command_not_found_re.match(line) is not None:
                 command_not_found.append(line.rstrip("\n"))
 
-            if (
-                dash_command_not_found_re.match(line) is not None
-                and command_not_found_exclude_re.search(line) is None
-            ):
+            if dash_command_not_found_re.match(line) is not None:
                 command_not_found.append(line.rstrip("\n"))
 
             if helper_missing_file_re.match(line) is not None:

Reply via email to