Bug #7641
Indeterminstic language processing
Status: | Closed | Start date: | 2015-05-02 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | - | |||
Target version: | - |
Description
Building OpenGFX from source results in non-matching md5 checksums.
The diff of the decompiled nfo files shows, that the order of the gender/case translation tables differ:
89 "GPL v2+" 0D 98 "Website: " 89 "http://dev.openttdcoop.org/pro" "jects/opengfx" 00 3 * 9 00 08 01 01 FF 23 00 15 00 - 4 * 58 00 08 03 01 FF 2B 00 13 01 76 79 72 00 02 6D 6F 74 00 00 14 06 6B 75 6F 00 01 6B 61 00 04 6B 6F 00 05 "kreip" 00 02 6B 61 6D 00 07 6B 75 72 00 03 6B 61 73 00 00 15 05 + 4 * 58 00 08 03 01 FF 2B 00 13 01 76 79 72 00 02 6D 6F 74 00 00 14 07 6B 75 72 00 01 6B 61 00 04 6B 6F 00 06 6B 75 6F 00 05 "kreip" 00 03 6B 61 73 00 02 6B 61 6D 00 00 15 05 5 * 17 00 08 02 01 FF 3A 00 13 01 6D 00 02 66 00 00 15 0B 6 * 9 00 08 01 01 FF 56 00 15 01 - 7 * 54 00 08 03 01 FF 66 00 13 05 66 70 00 02 66 00 01 6D 00 03 6E 00 04 6D 70 00 06 6E 70 00 00 14 02 61 63 63 00 03 64 61 74 00 01 61 62 6C 00 04 67 65 6E 00 00 15 00 + 7 * 54 00 08 03 01 FF 66 00 13 02 66 00 04 6D 70 00 03 6E 00 05 66 70 00 01 6D 00 06 6E 70 00 00 14 03 64 61 74 00 02 61 63 63 00 01 61 62 6C 00 04 67 65 6E 00 00 15 00 8 * 5 0D 7F \D= 9D 00 9 * 9 09 7F 04 \7! 01 00 00 00 06 10 * 5 0D 7D \D= A1 00
Associated revisions
Fix #7641: Sort gender and case translation tables deterministically (matthijs)
History
#1 Updated by matthijs almost 6 years ago
- File fix-nml-determinism.patch
added
I've attached a trivial patch which appears to fix this.
Here is the patch inline, too:
--- a/nml/actions/action0.py +++ b/nml/actions/action0.py @@ -869,6 +869,8 @@ class LanguageTranslationTable(BaseAction0Property): if name in extra_names: for extra_name in extra_names[name]: self.mappings.append( (idx, extra_name) ) + # Sort to keep the output deterministic + self.mappings.sort() def write(self, file): file.print_bytex(self.num)
#2 Updated by planetmaker almost 6 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
Applied in changeset 497ebd99ec17.