]> Savannah Git Hosting - gnulib.git/commitdiff
check-copyright: Don't fail because of the 'glob' module.
authorBruno Haible <bruno@clisp.org>
Tue, 7 Feb 2023 12:30:46 +0000 (13:30 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 7 Feb 2023 12:30:46 +0000 (13:30 +0100)
Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00057.html>.

* check-copyright: Filter out the files from the 'glob' module.

ChangeLog
check-copyright

index f595810b68435d9b875f3f0925d22a29737894b1..9ac80d4e58a01fa7b444447cc0d45e7be3e4f390 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-02-07  Bruno Haible  <bruno@clisp.org>
+
+       check-copyright: Don't fail because of the 'glob' module.
+       Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00057.html>.
+       * check-copyright: Filter out the files from the 'glob' module.
+
 2023-02-07  Bruno Haible  <bruno@clisp.org>
 
        check-copyright: Make output prettier.
index ee173c2595dd6f0e50d7cf08de3635f3694b07cf..bfd42fe1f2b8917377a26ff60029bfaa4b9b65e2 100755 (executable)
@@ -170,12 +170,20 @@ for file in $candidates; do
     fi
   done
   if test "$file_license" != "$weakest_license"; then
-    if test $error = 0; then
-      echo "Module License    File License      File name"
-      echo "================= ================= ====================================="
+    # The 'glob' module is a special case. It contains LGPLv2+ code (shared with
+    # glibc) but at the same time also has a dependency to a module under GPL
+    # (namely, 'fstatat'). This is not a mistake.
+    if test "$weakest_license" = GPL \
+       && case "$file" in lib/glob*) true ;; *) false ;; esac; then
+      :
+    else
+      if test $error = 0; then
+        echo "Module License    File License      File name"
+        echo "================= ================= ====================================="
+      fi
+      printf '%-17s %-17s %s\n' "$weakest_license" "$file_license" "$file"
+      error=1
     fi
-    printf '%-17s %-17s %s\n' "$weakest_license" "$file_license" "$file"
-    error=1
   fi
 done
 exit $error