changeset 30170:abd61bf1a0be

Report all license incompatibilities during --import.
author Bruno Haible <bruno@clisp.org>
date Thu, 25 Sep 2008 20:33:12 +0200
parents f4ffce9c671f
children eeaa0c743274
files ChangeLog gnulib-tool
diffstat 2 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Sep 25 16:02:58 2008 +0200
+++ b/ChangeLog	Thu Sep 25 20:33:12 2008 +0200
@@ -1,3 +1,9 @@
+2008-09-25  Derek Price  <derek@ximbiot.com>
+            Bruno Haible  <bruno@clisp.org>
+
+	* gnulib-tool (func_import): Report all license incompatibilities, not
+	just the first one.
+
 2008-09-25  Bruno Haible  <bruno@clisp.org>
 
 	* gnulib-tool (func_import): When computing the edits, consider not
--- a/gnulib-tool	Thu Sep 25 16:02:58 2008 +0200
+++ b/gnulib-tool	Thu Sep 25 20:33:12 2008 +0200
@@ -2516,6 +2516,7 @@
 
   # If --lgpl, verify that the licenses of modules are compatible.
   if test -n "$lgpl"; then
+    license_incompatibilities=
     for module in $main_modules; do
       license=`func_get_license $module`
       case $license in
@@ -2526,13 +2527,13 @@
             yes | 3)
               case $license in
                 LGPL | LGPLv2+) ;;
-                *) func_fatal_error "incompatible license on module $module: $license" ;;
+                *) func_append license_incompatibilities "$module $license$nl" ;;
               esac
               ;;
             2)
               case $license in
                 LGPLv2+) ;;
-                *) func_fatal_error "incompatible license on module $module: $license" ;;
+                *) func_append license_incompatibilities "$module $license$nl" ;;
               esac
               ;;
             *) func_fatal_error "invalid value lgpl=$lgpl" ;;
@@ -2540,6 +2541,13 @@
           ;;
       esac
     done
+    if test -n "$license_incompatibilities"; then
+      # Format the license incompatibilities as a table.
+      sed_expand_column1_width50_indent17='s,^\([^ ]*\) ,\1                                                   ,
+s,^\(.................................................[^ ]*\) *,                 \1 ,'
+      license_incompatibilities=`echo "$license_incompatibilities" | sed -e "$sed_expand_column1_width50_indent17"`
+      func_fatal_error "incompatible license on modules:$nl$license_incompatibilities"
+    fi
   fi
 
   # Show banner notice of every module.