diff options
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.patch | 56 |
1 files changed, 33 insertions, 23 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 70146c6181..23c68a0923 100644 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch @@ -1,14 +1,23 @@ +From b511bd1efb43ffc49c753e309717a242ec686ef1 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@intel.com> +Date: Tue, 1 Apr 2014 17:23:36 +0100 +Subject: [PATCH] gdk-pixbuf: add an option so that loader errors are fatal + If an environment variable is specified set the return value from main() to non-zero if the loader had errors (missing libraries, generally). -Upstream-Status: Pending +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/144] Signed-off-by: Ross Burton <ross.burton@intel.com> +--- + gdk-pixbuf/queryloaders.c | 19 +++++++++++++++---- + 1 file changed, 15 insertions(+), 4 deletions(-) + diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c -index a9ca015..395674a 100644 +index 1d39b44..2b00815 100644 --- a/gdk-pixbuf/queryloaders.c +++ b/gdk-pixbuf/queryloaders.c -@@ -146,7 +146,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info) +@@ -216,7 +216,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info) g_string_append_c (contents, '\n'); } @@ -17,7 +26,7 @@ index a9ca015..395674a 100644 query_module (GString *contents, const char *dir, const char *file) { char *path; -@@ -155,6 +155,7 @@ query_module (GString *contents, const char *dir, const char *file) +@@ -225,6 +225,7 @@ query_module (GString *contents, const char *dir, const char *file) void (*fill_vtable) (GdkPixbufModule *module); gpointer fill_info_ptr; gpointer fill_vtable_ptr; @@ -25,7 +34,7 @@ index a9ca015..395674a 100644 if (g_path_is_absolute (file)) path = g_strdup (file); -@@ -204,10 +205,13 @@ query_module (GString *contents, const char *dir, const char *file) +@@ -274,10 +275,13 @@ query_module (GString *contents, const char *dir, const char *file) g_module_error()); else g_fprintf (stderr, "Cannot load loader %s\n", path); @@ -38,26 +47,27 @@ index a9ca015..395674a 100644 + return ret; } - #ifdef G_OS_WIN32 -@@ -257,6 +261,7 @@ int main (int argc, char **argv) - GString *contents; - gchar *cache_file = NULL; + #if defined(G_OS_WIN32) && defined(GDK_PIXBUF_RELOCATABLE) +@@ -318,6 +322,7 @@ int main (int argc, char **argv) gint first_file = 1; + GFile *pixbuf_libdir_file; + gchar *pixbuf_libdir; + gboolean success = TRUE; #ifdef G_OS_WIN32 gchar *libdir; -@@ -360,7 +365,8 @@ 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); -+ if (!query_module (contents, path, dent)) -+ success = FALSE; - } - } - g_dir_close (dir); -@@ -378,7 +384,8 @@ int main (int argc, char **argv) +@@ -456,7 +461,9 @@ int main (int argc, char **argv) + } + modules = g_list_sort (modules, (GCompareFunc)strcmp); + for (l = modules; l != NULL; l = l->next) +- query_module (contents, moduledir, l->data); ++ if (!query_module (contents, moduledir, l->data)) ++ success = FALSE; ++ + g_list_free_full (modules, g_free); + g_free (moduledir); + #else +@@ -472,7 +479,8 @@ int main (int argc, char **argv) infilename = g_locale_to_utf8 (infilename, -1, NULL, NULL, NULL); #endif @@ -67,9 +77,9 @@ index a9ca015..395674a 100644 } g_free (cwd); } -@@ -394,5 +401,8 @@ int main (int argc, char **argv) - else - g_print ("%s\n", contents->str); +@@ -490,5 +498,8 @@ int main (int argc, char **argv) + + g_free (pixbuf_libdir); - return 0; + if (g_getenv ("GDK_PIXBUF_FATAL_LOADER")) |