After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783592 - queryloaders: Make output more reproducible
queryloaders: Make output more reproducible
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
: 777332 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-06-09 11:12 UTC by Jussi Kukkonen
Modified: 2017-10-02 10:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
queryloaders: Make output more reproducible (1.91 KB, patch)
2017-06-09 11:12 UTC, Jussi Kukkonen
accepted-commit_now Details | Review

Description Jussi Kukkonen 2017-06-09 11:12:38 UTC
Created attachment 353454 [details] [review]
queryloaders: Make output more reproducible

Current query-loaders loader order is unpredictable (it's based on fs directory order). This leads to loader.cache and gdk-pixbuf-thumbnailer.thumbnailer to be unpredictable: contents are correct but the loader order varies.

It would be better to always get the same output on specific input: this helps make OS image builds reproducible.
Comment 1 Bastien Nocera 2017-08-14 22:28:07 UTC
Review of attachment 353454 [details] [review]:

Looks good otherwise. Either respin the patch, or push to master after making the changes in the review. Thanks!

::: gdk-pixbuf/queryloaders.c
@@ +342,3 @@
                 const char *path;
                 GDir *dir;
+                GList *l, *modules = NULL;

initialise just before the loop below.

@@ +362,3 @@
                                 if (len > SOEXT_LEN &&
                                     strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
+                                        modules = g_list_prepend (modules,

no need for the new line here.
Comment 2 Bastien Nocera 2017-08-14 22:30:58 UTC
*** Bug 777332 has been marked as a duplicate of this bug. ***
Comment 3 Jussi Kukkonen 2017-08-15 11:30:57 UTC
Thanks, pushed to master as a42302aeb41 .
Comment 4 Bastien Nocera 2017-08-15 11:45:58 UTC
(In reply to Bastien Nocera from comment #1)
<snip>
> @@ +362,3 @@
>                                  if (len > SOEXT_LEN &&
>                                      strcmp (dent + len - SOEXT_LEN, SOEXT)
> == 0) {
> +                                        modules = g_list_prepend (modules,
> 
> no need for the new line here.

You removed the newline in the wrong place ;)
Comment 5 Jussi Kukkonen 2017-08-15 12:08:54 UTC
Oh you really wanted the g_list_prepend() on a single line? Sorry, I thought your comment wasn't in the right place -- my bad, shouldn't have assumed. Let me know if you want me to modify further.