summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch')
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch37
1 files changed, 17 insertions, 20 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
index 7d0d54bafe..25410b11ea 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
@@ -1,7 +1,7 @@
1From b6a7b30522455cab39a0b9ea8463313380146e70 Mon Sep 17 00:00:00 2001 1From f00603d58d844422363b896ea7d07aaf48ddaa66 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com> 2From: Ross Burton <ross.burton@intel.com>
3Date: Tue, 1 Apr 2014 17:23:36 +0100 3Date: Tue, 1 Apr 2014 17:23:36 +0100
4Subject: [PATCH 3/4] gdk-pixbuf: add an option so that loader errors are fatal 4Subject: [PATCH] gdk-pixbuf: add an option so that loader errors are fatal
5 5
6If an environment variable is specified set the return value from main() to 6If an environment variable is specified set the return value from main() to
7non-zero if the loader had errors (missing libraries, generally). 7non-zero if the loader had errors (missing libraries, generally).
@@ -14,10 +14,10 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
14 1 file changed, 15 insertions(+), 4 deletions(-) 14 1 file changed, 15 insertions(+), 4 deletions(-)
15 15
16diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c 16diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
17index a81c804..350bec8 100644 17index 312aa78..b813d99 100644
18--- a/gdk-pixbuf/queryloaders.c 18--- a/gdk-pixbuf/queryloaders.c
19+++ b/gdk-pixbuf/queryloaders.c 19+++ b/gdk-pixbuf/queryloaders.c
20@@ -146,7 +146,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info) 20@@ -212,7 +212,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info)
21 g_string_append_c (contents, '\n'); 21 g_string_append_c (contents, '\n');
22 } 22 }
23 23
@@ -26,7 +26,7 @@ index a81c804..350bec8 100644
26 query_module (GString *contents, const char *dir, const char *file) 26 query_module (GString *contents, const char *dir, const char *file)
27 { 27 {
28 char *path; 28 char *path;
29@@ -155,6 +155,7 @@ query_module (GString *contents, const char *dir, const char *file) 29@@ -221,6 +221,7 @@ query_module (GString *contents, const char *dir, const char *file)
30 void (*fill_vtable) (GdkPixbufModule *module); 30 void (*fill_vtable) (GdkPixbufModule *module);
31 gpointer fill_info_ptr; 31 gpointer fill_info_ptr;
32 gpointer fill_vtable_ptr; 32 gpointer fill_vtable_ptr;
@@ -34,7 +34,7 @@ index a81c804..350bec8 100644
34 34
35 if (g_path_is_absolute (file)) 35 if (g_path_is_absolute (file))
36 path = g_strdup (file); 36 path = g_strdup (file);
37@@ -204,10 +205,13 @@ query_module (GString *contents, const char *dir, const char *file) 37@@ -270,10 +271,13 @@ query_module (GString *contents, const char *dir, const char *file)
38 g_module_error()); 38 g_module_error());
39 else 39 else
40 g_fprintf (stderr, "Cannot load loader %s\n", path); 40 g_fprintf (stderr, "Cannot load loader %s\n", path);
@@ -48,26 +48,26 @@ index a81c804..350bec8 100644
48 } 48 }
49 49
50 #ifdef G_OS_WIN32 50 #ifdef G_OS_WIN32
51@@ -257,6 +261,7 @@ int main (int argc, char **argv) 51@@ -314,6 +318,7 @@ int main (int argc, char **argv)
52 GString *contents;
53 gchar *cache_file = NULL;
54 gint first_file = 1; 52 gint first_file = 1;
53 GFile *pixbuf_libdir_file;
54 gchar *pixbuf_libdir;
55+ gboolean success = TRUE; 55+ gboolean success = TRUE;
56 56
57 #ifdef G_OS_WIN32 57 #ifdef G_OS_WIN32
58 gchar *libdir; 58 gchar *libdir;
59@@ -370,7 +375,9 @@ int main (int argc, char **argv) 59@@ -452,7 +457,9 @@ int main (int argc, char **argv)
60 } 60 }
61 modules = g_list_sort (modules, (GCompareFunc)strcmp); 61 modules = g_list_sort (modules, (GCompareFunc)strcmp);
62 for (l = modules; l != NULL; l = l->next) 62 for (l = modules; l != NULL; l = l->next)
63- query_module (contents, path, l->data); 63- query_module (contents, moduledir, l->data);
64+ if (!query_module (contents, path, l->data)) 64+ if (!query_module (contents, moduledir, l->data))
65+ success = FALSE; 65+ success = FALSE;
66+ 66+
67 g_list_free_full (modules, g_free); 67 g_list_free_full (modules, g_free);
68 g_free (moduledir);
68 #else 69 #else
69 g_string_append_printf (contents, "# dynamic loading of modules not supported\n"); 70@@ -468,7 +475,8 @@ int main (int argc, char **argv)
70@@ -385,7 +392,8 @@ int main (int argc, char **argv)
71 infilename = g_locale_to_utf8 (infilename, 71 infilename = g_locale_to_utf8 (infilename,
72 -1, NULL, NULL, NULL); 72 -1, NULL, NULL, NULL);
73 #endif 73 #endif
@@ -77,9 +77,9 @@ index a81c804..350bec8 100644
77 } 77 }
78 g_free (cwd); 78 g_free (cwd);
79 } 79 }
80@@ -401,5 +409,8 @@ int main (int argc, char **argv) 80@@ -486,5 +494,8 @@ int main (int argc, char **argv)
81 else 81
82 g_print ("%s\n", contents->str); 82 g_free (pixbuf_libdir);
83 83
84- return 0; 84- return 0;
85+ if (g_getenv ("GDK_PIXBUF_FATAL_LOADER")) 85+ if (g_getenv ("GDK_PIXBUF_FATAL_LOADER"))
@@ -87,6 +87,3 @@ index a81c804..350bec8 100644
87+ else 87+ else
88+ return 0; 88+ return 0;
89 } 89 }
90--
912.14.1
92