commit:     e26bd1dfab6f31fb2b176b97ace56a7234d35b4d
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Dec 20 05:54:57 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=e26bd1df

ebuild: use generic variable for QA notices for command not found

calling this "bash_command_not_found" is overly specific. Just because
bash is used to detect the case doesn't mean it's specific to bash. And
really we should extend this find command_not_found for other
environments too.

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/package/ebuild/doebuild.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/portage/package/ebuild/doebuild.py 
b/lib/portage/package/ebuild/doebuild.py
index 956f8c0489..d10b157b68 100644
--- a/lib/portage/package/ebuild/doebuild.py
+++ b/lib/portage/package/ebuild/doebuild.py
@@ -2270,7 +2270,7 @@ def _check_build_log(mysettings, out=None):
         f = gzip.GzipFile(filename="", mode="rb", fileobj=f)
 
     am_maintainer_mode = []
-    bash_command_not_found = []
+    command_not_found = []
     bash_command_not_found_re = re.compile(
         r"(.*): line (\d*): (.*): command not found$"
     )
@@ -2382,7 +2382,7 @@ def _check_build_log(mysettings, out=None):
                 bash_command_not_found_re.match(line) is not None
                 and command_not_found_exclude_re.search(line) is None
             ):
-                bash_command_not_found.append(line.rstrip("\n"))
+                command_not_found.append(line.rstrip("\n"))
 
             if helper_missing_file_re.match(line) is not None:
                 helper_missing_file.append(line.rstrip("\n"))
@@ -2444,10 +2444,10 @@ def _check_build_log(mysettings, out=None):
         )
         _eqawarn(msg)
 
-    if bash_command_not_found:
+    if command_not_found:
         msg = [_("QA Notice: command not found:")]
         msg.append("")
-        msg.extend("\t" + line for line in bash_command_not_found)
+        msg.extend("\t" + line for line in command_not_found)
         _eqawarn(msg)
 
     if helper_missing_file:

Reply via email to