GNU bug report logs -
#25414
gdk-pixbuf@2.34.0 does not build deterministically
Previous Next
Reported by: ludo <at> gnu.org (Ludovic Courtès)
Date: Tue, 10 Jan 2017 23:08:01 UTC
Severity: normal
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Wed, 11 Jan 2017 00:06:42 +0100
ludo <at> gnu.org (Ludovic Courtès) wrote:
> Presumably ‘gdk-pixbuf-query-loaders’, which generates ‘loaders.cache’,
> does not sort the entries returned by readdir(2).
Yep.
gdk-pixbuf/queryloaders.c line 355 uses g_dir_open.
Docs: https://developer.gnome.org/glib/stable/glib-File-Utilities.html#g-dir-open "Note that the ordering is not defined."
One could use g_list_append to append it to a list and then g_list_sort and then g_list_free. Like below (untested! Seriously!):
--- gdk-pixbuf/queryloaders.c.orig 2017-01-11 00:17:32.865843062 +0100
+++ gdk-pixbuf/queryloaders.c 2017-01-11 00:31:29.428372177 +0100
@@ -354,16 +354,25 @@
dir = g_dir_open (path, 0, NULL);
if (dir) {
+ GList *entries = NULL;
const char *dent;
while ((dent = g_dir_read_name (dir))) {
gint len = strlen (dent);
if (len > SOEXT_LEN &&
strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
- query_module (contents, path, dent);
+ entries = g_list_append (entries, g_strdup (dent));
}
}
g_dir_close (dir);
+ entries = g_list_sort (entries, strcmp);
+ GList *xentries;
+ for (xentries = entries; xentries; xentries = g_list_next(xentries)) {
+ dent = xentries->data;
+ query_module (contents, path, dent);
+ g_free (xentries->data);
+ }
+ g_list_free(entries);
}
#else
g_string_append_printf (contents, "# dynamic loading of modules not supported\n");
This bug report was last modified 7 years and 348 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.