]> Savannah Git Hosting - gnulib.git/commitdiff
more fixes regarding --lgpl option
authorDmitry Selyutin <ghostmansd@gmail.com>
Thu, 5 Jul 2018 18:57:52 +0000 (21:57 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Thu, 5 Jul 2018 19:28:08 +0000 (22:28 +0300)
pygnulib/config.py
pygnulib/generator.py

index 9021fd2889e54057b74332420838d00ec79641fe..425ec3c08cfd4cb460a886f0149cdc12cb825279 100644 (file)
@@ -520,7 +520,7 @@ class CachedConfig(BaseConfig):
             match = pattern.findall(data)
             if match and key not in explicit:
                 if key == "licenses":
-                    self[key] = {
+                    self["licenses"] = {
                         "2": LGPLv2_LICENSE,
                         "3": LGPLv3_LICENSE,
                         "yes": LGPL_LICENSES,
index 20c3c7395931b8cada1e650ed40cf5366c92d352..c9b76590ea5083aebd7fe8c69cc508d657fe811d 100644 (file)
@@ -446,8 +446,9 @@ def command_line(config, explicit, **override):
             yield option
     for module in config.avoids:
         yield f"--avoid={module}"
-    if tuple(config.licenses) in _LGPL:
-        lgpl = _LGPL[tuple(config.licenses)]
+    licenses = tuple(sorted(config.licenses))
+    if licenses in _LGPL:
+        lgpl = _LGPL[licenses]
         if lgpl != "yes":
             yield f"--lgpl={lgpl}"
         else:
@@ -942,8 +943,9 @@ def gnulib_cache(config, explicit):
     if config.tests:
         yield "gl_WITH_TESTS"
     yield "gl_LIB([{}])".format(config.libname)
-    if tuple(config.licenses) in _LGPL:
-        lgpl = _LGPL[tuple(sorted(config.licenses))]
+    licenses = tuple(sorted(config.licenses))
+    if licenses in _LGPL:
+        lgpl = _LGPL[licenses]
         if lgpl != "yes":
             yield f"gl_LGPL([{lgpl}])"
         else: