]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
pygnulib.py: force cache invocation for some keys
authorDmitry Selyutin <ghostmansd@gmail.com>
Tue, 3 Oct 2017 07:44:38 +0000 (10:44 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 3 Oct 2017 07:47:18 +0000 (10:47 +0300)
pygnulib.py

index fee836e8c2eef6bf4b549ee833389eaecb660cae..8bdd2ea4ddd5c58a964622e74ef756adc8f9597d 100755 (executable)
@@ -62,14 +62,10 @@ def extract_hook(program, gnulib, mode, namespace, *args, **kwargs):
 def import_hook(script, gnulib, namespace, verbosity, options, *args, **kwargs):
     (_, _) = (args, kwargs)
     config = BaseConfig(**namespace)
-    if "ac_version" not in namespace:
-        configure = os.path.join(config.root, "configure.ac")
-        if not os.path.exists(configure):
-            configure = os.path.join(config.root, "configure.in")
-        if os.path.exists(configure):
-            with codecs.open(configure, "rb", "UTF-8") as stream:
-                match = AC_VERSION_PATTERN.findall(stream.read())
-                config.ac_version = float(match[-1]) if match else 2.59
+    cache = CacheConfig(configure=None)
+    for key in {"ac_version", "files"}:
+        if key not in namespace:
+            config[key] = cache[key]
     (base, full, main, final, tests) = transitive_closure(gnulib.module, config.modules, config.options)
 
     # Print some information about modules.