]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
rootfile consistency check: check also commented lines
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 23 Jan 2025 07:37:34 +0000 (08:37 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 23 Jan 2025 08:01:06 +0000 (09:01 +0100)
report also commented files to build rootfiles matching for all arches.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index 03e19fad6da215ebe946d575ed4defa18706e889..b40530c5cc193f1fff6f80aa137640d2069b52db 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -2183,7 +2183,15 @@ check_rootfiles_for_arch() {
        # A list of files that are not scanned
        # because they probably cause some false positives.
        local excluded_files=(
+               abseil-cpp
+               cmake
+               gdb
+               liburcu
                qemu
+               rust-memchr
+               rust-libc
+               rust-ppv-lite86
+               xfsprogs
        )
 
        # Exclude any architecture-specific directories
@@ -2198,9 +2206,9 @@ check_rootfiles_for_arch() {
                args+=( "--exclude" "${x}" )
        done
 
-       # Search for all files that contain the architecture, but exclude commented lines
+       # Search for all files that contain the architecture
        local files=(
-               $(grep --files-with-matches -r "^[^#].*${arch}" "${args[@]}")
+               $(grep --files-with-matches -r "^.*${arch}" "${args[@]}")
        )
 
        local file
@@ -2518,6 +2526,11 @@ shell)
        entershell
        ;;
 check)
+       # Check for rootfile consistency
+       if ! check_rootfiles; then
+               exiterror "Rootfiles are inconsistent"
+       fi
+
        check_changed_rootfiles
        ;;
 clean)