This unit test failure $ ./test-cache-3-27.sh Files ./test-cache-3-27.result/lib/Makefile.gnulib and tmp1986931-result/lib/Makefile.gnulib differ Files ./test-cache-3-27.result/m4/gnulib-cache.m4 and tmp1986931-result/m4/gnulib-cache.m4 differ Files ./test-cache-3-27.result/m4/gnulib-comp.m4 and tmp1986931-result/m4/gnulib-comp.m4 differ FAIL: gnulib-tool's result has unexpected differences. FAIL: test-cache-3-27.sh $ diff -u ./test-cache-3-27.result/m4/gnulib-cache.m4 tmp1986931-result/m4/gnulib-cache.m4 --- ./test-cache-3-27.result/m4/gnulib-cache.m4 2024-04-12 13:51:29.005078959 +0200 +++ tmp1986931-result/m4/gnulib-cache.m4 2024-04-12 19:49:06.953826301 +0200 @@ -40,7 +40,7 @@ # --lgpl \ # --makefile-name=Makefile.gnulib \ # --automake-subdir \ -# --no-conditional-dependencies \ +# --conditional-dependencies \ # --libtool \ # --macro-prefix=gl \ # --po-domain=prog \ @@ -65,6 +65,7 @@ gl_LGPL gl_MAKEFILE_NAME([Makefile.gnulib]) gl_AUTOMAKE_SUBDIR +gl_CONDITIONAL_DEPENDENCIES gl_LIBTOOL gl_MACRO_PREFIX([gl]) gl_PO_DOMAIN([prog])
is fixed by this patch: 2024-04-12 Bruno Haible <br...@clisp.org> gnulib-tool.py: Implement --no-conditional-dependencies correctly. * pygnulib/GLConfig.py (GLConfig.default): For 'conddeps', return None, not False. (GLConfig.checkCondDeps): Update result type. (resetCondDeps): Reset to return None, not False. * pygnulib/GLImport.py (GLImport.actioncmd): Update. diff --git a/pygnulib/GLConfig.py b/pygnulib/GLConfig.py index 1ac40207a3..e938b30a5e 100644 --- a/pygnulib/GLConfig.py +++ b/pygnulib/GLConfig.py @@ -319,12 +319,12 @@ class GLConfig: 'incl_test_categories', 'excl_test_categories']: return [] elif key in ['incobsolete', 'gnu_make', - 'automake_subdir', 'automake_subdir_tests', 'conddeps', + 'automake_subdir', 'automake_subdir_tests', 'libtests', 'dryrun']: return False elif key in ['copymode', 'lcopymode']: return CopyAction.Copy - elif key in ['lgpl', 'libtool', 'vc_files']: + elif key in ['lgpl', 'libtool', 'conddeps', 'vc_files']: return None elif key == 'errors': return True @@ -805,7 +805,7 @@ class GLConfig: self.table['libtool'] = None # Define conddeps methods. - def checkCondDeps(self) -> bool: + def checkCondDeps(self) -> bool | None: '''Check if user enabled conditional dependencies.''' return self.table['conddeps'] @@ -819,7 +819,7 @@ class GLConfig: def resetCondDeps(self) -> None: '''Reset conditional dependencies (may save configure time and object code).''' - self.table['conddeps'] = False + self.table['conddeps'] = None # Define lgpl methods. def getLGPL(self) -> str | bool | None: diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 5f95706fc7..b6c9bbeea3 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -444,9 +444,9 @@ class GLImport: actioncmd += ' \\\n# --automake-subdir' if automake_subdir_tests: actioncmd += ' \\\n# --automake-subdir-tests' - if conddeps: + if conddeps == True: actioncmd += ' \\\n# --conditional-dependencies' - else: # if not conddeps + else: # if conddeps == False or conddeps == None actioncmd += ' \\\n# --no-conditional-dependencies' if libtool == True: actioncmd += ' \\\n# --libtool'