summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xgnulib-tool.py2
-rw-r--r--pygnulib/GLTestDir.py35
3 files changed, 25 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f88a72f90..c334581d4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2022-08-03 Bruno Haible <bruno@clisp.org>
+ gnulib-tool.py: Fix unjustified "incompatible license" warnings.
+ * pygnulib/GLTestDir.py (GLTestDir.execute): Don't emit a warning when
+ the dependency module has a license such as "public domain" or
+ "unlimited".
+
gnulib-tool.py: Follow gnulib-tool changes, part 22.
Follow gnulib-tool change
2016-10-15 Bruno Haible <bruno@clisp.org>
diff --git a/gnulib-tool.py b/gnulib-tool.py
index 2ac522aa05..0e5914a402 100755
--- a/gnulib-tool.py
+++ b/gnulib-tool.py
@@ -24,7 +24,7 @@
# - Line length is not limited to 79 characters.
# - Line breaking before or after binary operators? Better before, like in GNU.
# You can use this command to check the style:
-# $ pycodestyle --max-line-length=128 --ignore=E265,W503,E241,E711,E712,E201,E202 gnulib-tool.py pygnulib/*.py
+# $ pycodestyle --max-line-length=136 --ignore=E265,W503,E241,E711,E712,E201,E202 gnulib-tool.py pygnulib/*.py
#===============================================================================
diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py
index f0a1a43883..83555faad7 100644
--- a/pygnulib/GLTestDir.py
+++ b/pygnulib/GLTestDir.py
@@ -184,25 +184,28 @@ class GLTestDir(object):
self.config.disableTestFlag(TESTS['tests'])
for requested_module in base_modules:
requested_licence = requested_module.getLicense()
- # Here we use self.moduletable.transitive_closure([module]), not just
- # module.getDependencies, so that we also detect weird situations like
- # an LGPL module which depends on a GPLed build tool module which depends
- # on a GPL module.
if requested_licence != 'GPL':
- modules = self.moduletable.transitive_closure(
- [requested_module])
+ # Here we use self.moduletable.transitive_closure([module]), not
+ # just module.getDependencies, so that we also detect weird
+ # situations like an LGPL module which depends on a GPLed build
+ # tool module which depends on a GPL module.
+ modules = self.moduletable.transitive_closure([requested_module])
for module in modules:
license = module.getLicense()
- errormsg = 'module %s depends on a module ' % requested_module
- errormsg += 'with an incompatible license: %s\n' % module
- if requested_licence == 'GPLv2+':
- if license not in ['GPLv2+', 'LGPLv2+']:
- sys.stderr.write(errormsg)
- elif requested_licence in ['LGPL']:
- if license not in ['LGPL', 'LGPLv2+']:
- sys.stderr.write(errormsg)
- elif requested_licence in ['LGPLv2+']:
- if license not in ['LGPLv2+']:
+ if license not in ['GPLv2+ build tool', 'GPLed build tool',
+ 'public domain', 'unlimited', 'unmodifiable license text']:
+ incompatible = False
+ if requested_licence == 'GPLv2+':
+ if license not in ['GPLv2+', 'LGPLv2+']:
+ incompatible = True
+ elif requested_licence in ['LGPL']:
+ if license not in ['LGPL', 'LGPLv2+']:
+ incompatible = True
+ elif requested_licence in ['LGPLv2+']:
+ if license not in ['LGPLv2+']:
+ incompatible = True
+ if incompatible:
+ errormsg = 'module %s depends on a module with an incompatible license: %s\n' % (requested_module, module)
sys.stderr.write(errormsg)
self.config.setTestFlags(saved_testflags)