[Pkg-xfce-commits] r6116 - in desktop/trunk/thunar/debian: . patches

Lionel Le Folgoc mrpouit-guest at alioth.debian.org
Tue Oct 11 07:59:45 UTC 2011


Author: mrpouit-guest
Date: 2011-10-11 19:59:45 +0000 (Tue, 11 Oct 2011)
New Revision: 6116

Added:
   desktop/trunk/thunar/debian/patches/01_support-non-multiarch-modules.patch
   desktop/trunk/thunar/debian/patches/series
Modified:
   desktop/trunk/thunar/debian/changelog
Log:
debian/patches/01_support-non-multiarch-modules.patch: support modules
installed in /usr/lib/$triplet and /usr/lib, to hopefully migrate smoothly
panel plugins to multiarch path over time without breakage. Closes: #645015

Modified: desktop/trunk/thunar/debian/changelog
===================================================================
--- desktop/trunk/thunar/debian/changelog	2011-10-11 12:33:41 UTC (rev 6115)
+++ desktop/trunk/thunar/debian/changelog	2011-10-11 19:59:45 UTC (rev 6116)
@@ -1,10 +1,16 @@
 thunar (1.2.3-2) UNRELEASED; urgency=low
 
+  [ Yves-Alexis Perez ]
   * debian/rules:
     - re-add -z,defs to LDFLAGS.
   * debian/control:
     - only recommends thunar-volman on linux arches.
 
+  [ Lionel Le Folgoc ]
+  * debian/patches/01_support-non-multiarch-modules.patch: support modules
+    installed in /usr/lib/$triplet and /usr/lib, to hopefully migrate smoothly
+    panel plugins to multiarch path over time without breakage. Closes: #645015
+
  -- Yves-Alexis Perez <corsac at debian.org>  Thu, 29 Sep 2011 13:56:55 +0200
 
 thunar (1.2.3-1) unstable; urgency=low

Added: desktop/trunk/thunar/debian/patches/01_support-non-multiarch-modules.patch
===================================================================
--- desktop/trunk/thunar/debian/patches/01_support-non-multiarch-modules.patch	                        (rev 0)
+++ desktop/trunk/thunar/debian/patches/01_support-non-multiarch-modules.patch	2011-10-11 19:59:45 UTC (rev 6116)
@@ -0,0 +1,63 @@
+From 6376360bd33778c751d878a1c722fcaedbe69512 Mon Sep 17 00:00:00 2001
+From: Lionel Le Folgoc <lionel at lefolgoc.net>
+Date: Tue, 11 Oct 2011 21:30:17 +0200
+Subject: Look for plugins in {non-,}multiarch THUNARX_DIRECTORY
+
+This will let a multiarch enabled libthunarx find plugins built against a
+non-multiarch thunar (load plugins from both /usr/lib/$triplet and /usr/lib).
+---
+ thunarx/thunarx-provider-factory.c |   12 +++++++++++-
+ thunarx/thunarx-provider-module.c  |    6 ++++++
+ 2 files changed, 17 insertions(+), 1 deletions(-)
+
+diff --git a/thunarx/thunarx-provider-factory.c b/thunarx/thunarx-provider-factory.c
+index f2588eb..cbcf642 100644
+--- a/thunarx/thunarx-provider-factory.c
++++ b/thunarx/thunarx-provider-factory.c
+@@ -145,8 +145,17 @@ thunarx_provider_factory_load_modules (ThunarxProviderFactory *factory)
+   GList                 *modules = NULL;
+   GList                 *lp;
+   GDir                  *dp;
++  gsize                  i;
++  const gchar           *thunarx_dirs[] =
++                          {
++                            THUNARX_DIRECTORY,
++                            "/usr/lib/thunarx-2"
++                          };
+ 
+-  dp = g_dir_open (THUNARX_DIRECTORY, 0, NULL);
++  /* Search both multiarch and non-multiarch THUNARX_DIRECTORYs */
++  for (i = 0; i < G_N_ELEMENTS (thunarx_dirs); ++i)
++  {
++  dp = g_dir_open (thunarx_dirs[i], 0, NULL);
+   if (G_LIKELY (dp != NULL))
+     {
+       /* determine the types for all existing plugins */
+@@ -192,6 +201,7 @@ thunarx_provider_factory_load_modules (ThunarxProviderFactory *factory)
+ 
+       g_dir_close (dp);
+     }
++  }
+ 
+   return modules;
+ }
+diff --git a/thunarx/thunarx-provider-module.c b/thunarx/thunarx-provider-module.c
+index 4f96ffd..dbb693b 100644
+--- a/thunarx/thunarx-provider-module.c
++++ b/thunarx/thunarx-provider-module.c
+@@ -178,6 +178,12 @@ thunarx_provider_module_load (GTypeModule *type_module)
+ 
+   /* load the module using the runtime link editor */
+   path = g_build_filename (THUNARX_DIRECTORY, type_module->name, NULL);
++  if (!g_file_test (path, G_FILE_TEST_EXISTS))
++    {
++      /* if it doesn't exist in the default dir, try non-multiarch THUNARX_DIRECTORY */
++      g_free (path);
++      path = g_build_filename ("/usr/lib/thunarx-2", type_module->name, NULL);
++    }
+   module->library = g_module_open (path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
+   g_free (path);
+ 
+-- 
+1.7.7
+

Added: desktop/trunk/thunar/debian/patches/series
===================================================================
--- desktop/trunk/thunar/debian/patches/series	                        (rev 0)
+++ desktop/trunk/thunar/debian/patches/series	2011-10-11 19:59:45 UTC (rev 6116)
@@ -0,0 +1 @@
+01_support-non-multiarch-modules.patch




More information about the Pkg-xfce-commits mailing list