summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2017-06-09 11:03:19 +0300
committerJussi Kukkonen <jussi.kukkonen@intel.com>2017-08-15 14:23:18 +0300
commita42302aeb4194d3ce3343495190409acea28540a (patch)
tree55c7dca18efaf3700bdd8d4bb69835882f35ee53 /gdk-pixbuf
parent82664fe35c73f28ecc8857b146e76768315f182a (diff)
downloadgdk-pixbuf-a42302aeb4194d3ce3343495190409acea28540a.tar.gz
queryloaders: Make output more reproducible
Reproducible builds are good: Sort the output by module name so that same input always leads to same output. This should also make gdk-pixbuf-print-mime-types output and gdk-pixbuf-thumbnailer.thumbnailer reproducible. https://bugzilla.gnome.org/show_bug.cgi?id=783592
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/queryloaders.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
index a9ca01524..a81c80430 100644
--- a/gdk-pixbuf/queryloaders.c
+++ b/gdk-pixbuf/queryloaders.c
@@ -341,6 +341,7 @@ int main (int argc, char **argv)
#ifdef USE_GMODULE
const char *path;
GDir *dir;
+ GList *l, *modules;
path = g_getenv ("GDK_PIXBUF_MODULEDIR");
#ifdef G_OS_WIN32
@@ -352,6 +353,7 @@ int main (int argc, char **argv)
g_string_append_printf (contents, "# LoaderDir = %s\n#\n", path);
+ modules = NULL;
dir = g_dir_open (path, 0, NULL);
if (dir) {
const char *dent;
@@ -360,11 +362,16 @@ int main (int argc, char **argv)
gint len = strlen (dent);
if (len > SOEXT_LEN &&
strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
- query_module (contents, path, dent);
+ modules = g_list_prepend (modules,
+ g_strdup (dent));
}
}
g_dir_close (dir);
}
+ modules = g_list_sort (modules, (GCompareFunc)strcmp);
+ for (l = modules; l != NULL; l = l->next)
+ query_module (contents, path, l->data);
+ g_list_free_full (modules, g_free);
#else
g_string_append_printf (contents, "# dynamic loading of modules not supported\n");
#endif