Bug#872728: desktop-file-utils: please make the output reproducible
Chris Lamb
lamby at debian.org
Sun Aug 20 15:13:51 UTC 2017
Source: desktop-file-utils
Version: 0.23-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: toolchain
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that desktop-file-utils produces mimeinfo.cache files that are not
reproducible.
This is because it inherits the non-deterministic hash ordering of
the mime_types_map data structure.
Patch attached that sorts just prior to output.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
diff --git a/src/update-desktop-database.c b/src/update-desktop-database.c
index 7f48357..165d133 100644
--- a/src/update-desktop-database.c
+++ b/src/update-desktop-database.c
@@ -307,6 +307,7 @@ add_mime_type (const char *mime_type, GList *desktop_files, FILE *f)
list = g_string_new (mime_type);
g_string_append_c (list, '=');
+ desktop_files = g_list_sort (desktop_files, (GCompareFunc) g_strcmp0);
for (desktop_file = desktop_files;
desktop_file != NULL;
desktop_file = desktop_file->next)
More information about the Reproducible-bugs
mailing list