Skip to content

Commit

Permalink
command not found QA: don't skip QA warnings that come from ./configure
Browse files Browse the repository at this point in the history
Down through the twisting trail of history, we find a 2008 bug report
and commit 930bbbf, 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 <[email protected]>
  • Loading branch information
eli-schwartz committed Dec 20, 2023
1 parent 4a57a04 commit 5f44525
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/portage/package/ebuild/doebuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -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$")

Expand Down Expand Up @@ -2379,16 +2378,10 @@ def _eerror(lines):
):
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:
Expand Down

0 comments on commit 5f44525

Please sign in to comment.