Source: ibus-table
Version: 1.9.1-3
Severity: wishlist
Tags: patch
Usertags: toolchain randomness


While working on the "reproducible builds" effort [0], we have noticed
that ibus-table-createdb creates output with non-determinstic output
due to Python dict ordering.

The attached patch removes this randomness from the build system. Once
applied, packages using ibus-table can be built reproducibly in our
reproducible toolchain.



     : :'  :     Chris Lamb
     `. `'` /
diff --git a/engine/ b/engine/
index 258c838..b8a858a 100644
--- a/engine/
+++ b/engine/
@@ -566,7 +566,7 @@ class tabsqlitedb:
         VALUES (:tabkeys, :phrase, :freq, :user_freq);
         ''' %{'database': database}
         insert_sqlargs = []
-        for (tabkeys, phrase, freq, user_freq) in phrases:
+        for (tabkeys, phrase, freq, user_freq) in sorted(phrases):
              insert_sqlargs.append({'tabkeys': tabkeys, 'phrase': phrase, 
'freq': freq, 'user_freq': user_freq})
         self.db.executemany(insert_sqlstr, insert_sqlargs)
Reproducible-builds mailing list

Reply via email to