summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-gnome')
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch79
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb1
2 files changed, 80 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
new file mode 100644
index 0000000000..70146c6181
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
@@ -0,0 +1,79 @@
1If an environment variable is specified set the return value from main() to
2non-zero if the loader had errors (missing libraries, generally).
3
4Upstream-Status: Pending
5Signed-off-by: Ross Burton <ross.burton@intel.com>
6
7diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
8index a9ca015..395674a 100644
9--- a/gdk-pixbuf/queryloaders.c
10+++ b/gdk-pixbuf/queryloaders.c
11@@ -146,7 +146,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info)
12 g_string_append_c (contents, '\n');
13 }
14
15-static void
16+static gboolean
17 query_module (GString *contents, const char *dir, const char *file)
18 {
19 char *path;
20@@ -155,6 +155,7 @@ query_module (GString *contents, const char *dir, const char *file)
21 void (*fill_vtable) (GdkPixbufModule *module);
22 gpointer fill_info_ptr;
23 gpointer fill_vtable_ptr;
24+ gboolean ret = TRUE;
25
26 if (g_path_is_absolute (file))
27 path = g_strdup (file);
28@@ -204,10 +205,13 @@ query_module (GString *contents, const char *dir, const char *file)
29 g_module_error());
30 else
31 g_fprintf (stderr, "Cannot load loader %s\n", path);
32+ ret = FALSE;
33 }
34 if (module)
35 g_module_close (module);
36 g_free (path);
37+
38+ return ret;
39 }
40
41 #ifdef G_OS_WIN32
42@@ -257,6 +261,7 @@ int main (int argc, char **argv)
43 GString *contents;
44 gchar *cache_file = NULL;
45 gint first_file = 1;
46+ gboolean success = TRUE;
47
48 #ifdef G_OS_WIN32
49 gchar *libdir;
50@@ -360,7 +365,8 @@ int main (int argc, char **argv)
51 gint len = strlen (dent);
52 if (len > SOEXT_LEN &&
53 strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
54- query_module (contents, path, dent);
55+ if (!query_module (contents, path, dent))
56+ success = FALSE;
57 }
58 }
59 g_dir_close (dir);
60@@ -378,7 +384,8 @@ int main (int argc, char **argv)
61 infilename = g_locale_to_utf8 (infilename,
62 -1, NULL, NULL, NULL);
63 #endif
64- query_module (contents, cwd, infilename);
65+ if (!query_module (contents, cwd, infilename))
66+ success = FALSE;
67 }
68 g_free (cwd);
69 }
70@@ -394,5 +401,8 @@ int main (int argc, char **argv)
71 else
72 g_print ("%s\n", contents->str);
73
74- return 0;
75+ if (g_getenv ("GDK_PIXBUF_FATAL_LOADER"))
76+ return success ? 0 : 1;
77+ else
78+ return 0;
79 }
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb
index 85a7b439de..50e54d8eab 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb
@@ -18,6 +18,7 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
18 file://extending-libinstall-dependencies.patch \ 18 file://extending-libinstall-dependencies.patch \
19 file://run-ptest \ 19 file://run-ptest \
20 file://tests-check.patch \ 20 file://tests-check.patch \
21 file://fatal-loader.patch \
21 " 22 "
22 23
23SRC_URI[md5sum] = "81161cc895eb43afd9ae7354b87e2261" 24SRC_URI[md5sum] = "81161cc895eb43afd9ae7354b87e2261"