[Git][reproducible-builds/reprotest][master] Do not randomize chosen locale and use a UTF-8 supported locale.

Vagrant Cascadian (@vagrant) gitlab at salsa.debian.org
Thu Feb 16 22:33:18 UTC 2023



Vagrant Cascadian pushed to branch master at Reproducible Builds / reprotest


Commits:
610e6cae by Vagrant Cascadian at 2023-02-16T14:21:09-08:00
Do not randomize chosen locale and use a UTF-8 supported locale.
(Closes: #925879, #1004950)

Use an Estonian locale, which has unusual sort order compared to many
european languages, which may catch some interesting issues.

Testing more obscure locales and character sets is certainly
desireable, but it is also very important for reprotest to pick the
varied locale deterministically.

Randomly choosing the locale, or choosing based on a hash of the
inputs, might lead to picking a different locale while debugging
patches for a potential fix, with misleading results if the issue is
highly locale specific.

- - - - -


1 changed file:

- reprotest/build.py


Changes:

=====================================
reprotest/build.py
=====================================
@@ -367,9 +367,9 @@ def locales(ctx, build, vary):
     if not vary:
         return build.add_env('LANG', 'C.UTF-8').add_env('LANGUAGE', 'en_US:en')
     else:
-        # if there is an issue with this being random, we could instead select it
-        # based on a deterministic hash of the inputs
-        loc = random.choice(['fr_CH.UTF-8', 'es_ES', 'ru_RU.CP1251', 'kk_KZ.RK1048', 'zh_CN'])
+        # TODO: support specifying locale to vary
+        # Use an Estonian locale by default, which has interesting sort order for ASCII characters
+        loc = 'et_EE.UTF-8'
         if ctx.verbosity >= 1:
             logger.info("LOCALE variation: LC_ALL = " + loc + " LANGUAGE = " + loc + ":fr")
         return build.add_env('LANG', loc).add_env('LC_ALL', loc).add_env('LANGUAGE', '%s:fr' % loc)



View it on GitLab: https://salsa.debian.org/reproducible-builds/reprotest/-/commit/610e6cae15fe8d066303694af97bf3a09a6b01c2

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/reprotest/-/commit/610e6cae15fe8d066303694af97bf3a09a6b01c2
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20230216/d8fc38aa/attachment.htm>


More information about the rb-commits mailing list