r34804 - in /desktop/unstable/glade/debian: changelog patches/01_load_catalog_libraries_from_multiarch_path.patch patches/series rules

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Sun May 13 16:37:09 UTC 2012


Author: biebl
Date: Sun May 13 16:37:08 2012
New Revision: 34804

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=34804
Log:
Rely on g_module_open () to load the glade catalog libraries from the
system directories instead of hard-coding the paths. This way libraries
from multiarch paths are correctly loaded. Closes: #666241

Modified:
    desktop/unstable/glade/debian/changelog
    desktop/unstable/glade/debian/patches/01_load_catalog_libraries_from_multiarch_path.patch
    desktop/unstable/glade/debian/patches/series
    desktop/unstable/glade/debian/rules

Modified: desktop/unstable/glade/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glade/debian/changelog?rev=34804&op=diff
==============================================================================
--- desktop/unstable/glade/debian/changelog [utf-8] (original)
+++ desktop/unstable/glade/debian/changelog [utf-8] Sun May 13 16:37:08 2012
@@ -2,7 +2,9 @@
 
   * New upstream release.
   * Bump Standards-Version to 3.9.3.
-  * Try loading glade catalog libraries from multiarch paths. Closes: #666241
+  * Rely on g_module_open () to load the glade catalog libraries from the
+    system directories instead of hard-coding the paths. This way libraries
+    from multiarch paths are correctly loaded. Closes: #666241
 
  -- Michael Biebl <biebl at debian.org>  Sun, 13 May 2012 17:05:12 +0200
 

Modified: desktop/unstable/glade/debian/patches/01_load_catalog_libraries_from_multiarch_path.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glade/debian/patches/01_load_catalog_libraries_from_multiarch_path.patch?rev=34804&op=diff
==============================================================================
--- desktop/unstable/glade/debian/patches/01_load_catalog_libraries_from_multiarch_path.patch [utf-8] (original)
+++ desktop/unstable/glade/debian/patches/01_load_catalog_libraries_from_multiarch_path.patch [utf-8] Sun May 13 16:37:08 2012
@@ -1,30 +1,58 @@
-Description: Try to load catalog libraries from multiarch paths
-Author: Michael Biebl <biebl at debian.org>
+Description: Don't hard-code library search paths
+ Instead skip the directory when calling g_module_build_path () and let
+ g_module_open () search the default system paths which includes the
+ multiarch location.
+Author: Julien Cristau <jcristau at debian.org>
 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666241
 diff --git a/gladeui/glade-utils.c b/gladeui/glade-utils.c
-index bf9542e..3aef8b7 100644
+index bf9542e..b764a93 100644
 --- a/gladeui/glade-utils.c
 +++ b/gladeui/glade-utils.c
-@@ -55,6 +55,14 @@
+@@ -854,12 +854,12 @@ try_load_library (const gchar *library_path, const gchar *library_name)
+   GModule *module = NULL;
+   gchar *path;
  
- #define GLADE_UTIL_COPY_BUFFSIZE       1024
+-  path = g_module_build_path (library_path, library_name);
+-  if (g_file_test (path, G_FILE_TEST_EXISTS))
+-    {
+-      if (!(module = g_module_open (path, G_MODULE_BIND_LAZY)))
+-        g_warning ("Failed to load %s: %s", path, g_module_error ());
+-    }
++  if (library_path)
++    path = g_module_build_path (library_path, library_name);
++  else
++    path = g_module_build_path (NULL, library_name);
++  if (!(module = g_module_open (path, G_MODULE_BIND_LAZY)))
++    g_debug ("Failed to load %s: %s", path, g_module_error ());
+   g_free (path);
  
-+/*
-+ * If MULTIARCH is not defined, fall back to load the glade catalog
-+ * library from /usr/lib
-+ */
-+#ifndef LIBDIR_MULTIARCH
-+#define LIBDIR_MULTIARCH "/usr/lib"
-+#endif
-+
- 
- /**
-  * glade_util_compose_get_type_func:
-@@ -884,6 +892,7 @@ glade_util_load_library (const gchar *library_name)
+   return module;
+@@ -882,8 +882,6 @@ glade_util_load_library (const gchar *library_name)
+ {
+   gchar *default_paths[] = { (gchar *) glade_app_get_modules_dir (),
      NULL,                       /* <-- dynamically allocated */
-     "/lib",
-     "/usr/lib",
-+    LIBDIR_MULTIARCH,
+-    "/lib",
+-    "/usr/lib",
      "/usr/local/lib",
      NULL
    };
+@@ -909,7 +907,7 @@ glade_util_load_library (const gchar *library_name)
+ 
+   if (!module)
+     {
+-      /* Search ${prefix}/lib after searching ${prefix}/lib/glade3/modules... */
++      /* Search ${prefix}/lib after searching ${prefix}/lib/glade/modules... */
+       default_paths[1] =
+           g_build_filename (glade_app_get_modules_dir (), "..", "..", NULL);
+ 
+@@ -921,6 +919,10 @@ glade_util_load_library (const gchar *library_name)
+       g_free (default_paths[1]);
+     }
+ 
++  /* Use default system paths */
++  if (!module)
++    module = try_load_library (NULL, library_name);
++
+   if (!module)
+     g_critical ("Unable to load module '%s' from any search paths",
+                 library_name);

Modified: desktop/unstable/glade/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glade/debian/patches/series?rev=34804&op=diff
==============================================================================
--- desktop/unstable/glade/debian/patches/series [utf-8] (original)
+++ desktop/unstable/glade/debian/patches/series [utf-8] Sun May 13 16:37:08 2012
@@ -1,2 +1,2 @@
+99_ltmain_as-needed.patch
 01_load_catalog_libraries_from_multiarch_path.patch
-99_ltmain_as-needed.patch

Modified: desktop/unstable/glade/debian/rules
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glade/debian/rules?rev=34804&op=diff
==============================================================================
--- desktop/unstable/glade/debian/rules [utf-8] (original)
+++ desktop/unstable/glade/debian/rules [utf-8] Sun May 13 16:37:08 2012
@@ -10,6 +10,4 @@
 			--enable-gtk-doc \
 			--disable-scrollkeeper
 
-CPPFLAGS += -DLIBDIR_MULTIARCH=\\\"/usr/lib/$(DEB_HOST_MULTIARCH)\\\"
-
 LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed




More information about the pkg-gnome-commits mailing list