Bug#1090981: dictionaries-common: Randomness in emacsen-ispell-dicts.el (now due to enchant)

Roland Clobus rclobus at rclobus.nl
Sat Dec 21 15:19:10 GMT 2024


Package: dictionaries-common
Version: 1.30.2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hello maintainers of dictionaries-common,

While working on the “reproducible builds” effort [1], I have noticed
that 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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20241221/f9fd8bac/attachment.sig>


More information about the Reproducible-bugs mailing list