Package: dictionaries-common Version: 1.30.2 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: randomness X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hello maintainers of dictionaries-common, While working on the “reproducible builds” effort [1], I have noticedthat the content of the file '/var/cache/dictionaries-common/emacsen-ispell-dicts.el' is changing randomly again.
Previously in #1000674 I reported something similar, but since then a new section has been added: debian-enchant-equivs-alist.
In the section 'debian-enchant-equivs-alist', the value for the 'ro_RO' key can toggle between 'ro_RO' and 'romanian'. Because Perl does not have a reproducible order in a foreach statement (unless the keyword sort is used), it will be rather random which value for the key 'ro_RO' will be set last. With the environment variable PERL_HASH_SEED [2] I've been able to generate a reproducible test case. Note that the value for 'ro_RO.UTF-8' is always 'romanian'.
My steps to reproduce:* I've used the recent GNOME live image from https://get.debian.org/images/weekly-live-builds/amd64/iso-hybrid/
* Run either of the following commands: ** PERL_HASH_SEED=1 update-dictcommon-aspell ** PERL_HASH_SEED=2 update-dictcommon-aspell* Look at the content of the file '/var/cache/dictionaries-common/emacsen-ispell-dicts.el'
A possible patch is really small, here is the inline patch: In line 656 of scripts/perl5/Debian/DictionariesCommon.pm.in, change foreach my $k (keys %$dictionaries) { to foreach my $k (sort keys %$dictionaries) { With kind regards, Roland Clobus [1]: https://wiki.debian.org/ReproducibleBuilds [2]: https://reproducible-builds.org/docs/stable-outputs/
OpenPGP_signature.asc
Description: OpenPGP digital signature