bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnulib-tool.py: Don't discard the 'dummy' module.


From: Collin Funk
Subject: gnulib-tool.py: Don't discard the 'dummy' module.
Date: Sat, 30 Mar 2024 03:43:11 -0700
User-agent: Mozilla Thunderbird

In a few of the import tests gnulib-tool.py doesn't add the 'dummy'
module even though gnulib-tool.sh does.

This is because the 'dummy' module was added after GLImport saved the
modules in the GLModuleTable:

        # Transmit base_modules, final_modules, main_modules and tests_modules.
        self.moduletable.setBaseModules(base_modules)
        self.moduletable.setFinalModules(final_modules)
        self.moduletable.setMainModules(main_modules)
        self.moduletable.setTestsModules(tests_modules)

After reordering these, the output is still incorrect. gnulib-tool.py
places the 'dummy' module at the top of the Makefiles, but
gnulib-tool.sh places them at the bottom.

Changing the moduletable functions to remove the sorting here seems to
fix the issue:

-        self.tests_modules = sorted(set(modules))
+        self.tests_modules = modules

This seems to be fine since GLModuleTable.transitive_closure and
GLModuleTable.transitive_closure_separately sort and remove duplicates
before these are called.

Collin

Attachment: 0001-gnulib-tool.py-Don-t-discard-the-dummy-module.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]