Hi Bruno, On 2/24/24 5:25 PM, Bruno Haible wrote: > None of the 'sort' invocations in gnulib-tool are covered by an > entry in the gnulib-tool.py.TODO file. Therefore the most promising > approach to finding the cause of the difference is to > - go through all 'sort' invocations in gnulib-tool, > - find the corresponding place in pygnulib/ and see whether > sorting happens there as well or has been forgotten. Thank you for the advice and for looking over all of these patches. I think that this patch should be a solution to the issue as long as I am understanding gnulib-tool correctly. From what I could understand, it seems that upon seeing that the mode is "import", the specified_modules is set with the unsorted list of modules [1]. Then that variable is sorted before it is used [2]. Could you confirm that I am understanding this correctly? If so, I feel that this patch should be the correct way to handle it. My initial ideas where to sort the modules in main() before the GLConfig object was created, or to modify the GLConfig class's methods which are used to set the modules in use. I think the second option is less likely to be broken by future changes. The changes involve using a set and sorted() to substitute `sort -u'. [1] https://git.savannah.gnu.org/cgit/gnulib.git/tree/gnulib-tool#n5085 [2] https://git.savannah.gnu.org/cgit/gnulib.git/tree/gnulib-tool#n5268