tags 813316 +patch
thanks
pstoedit no longer has support for the plot-svg format, and that seems
weird.

It looks like a plugin loading issue, the plugins are being built and installed but they are not being loaded for some reason. It's not just svg, jessie's version of pstoedit lists many plugins loaded from so files while sid's version only lists built-in plugins.

Further investigation using the -verbose option shows it seems to be looking in the wrong places.

Jessie:
loading plugins from /usr/bin using suffix: .so
loading plugins from /usr/lib/i386-linux-gnu/pstoedit using suffix: .so

Sid:
loading plugins from /usr/bin using suffix: .so
loading plugins from /usr/bin/../lib/pstoedit using suffix: .so
opendir failed on: /usr/bin/../lib/pstoedit

Reading the code shows that the code that loads plugins from PSTOEDITLIBDIR (which seems to be the right option for Debian has changed between Jessie's version and stretch/sid's version

Jessie:
#ifdef PSTOEDITLIBDIR
    // also try to load drivers from the PSTOEDITLIBDIR
    loadPlugInDrivers(PSTOEDITLIBDIR, errstream,verbose);
    pluginsloaded = true;
#endif

Stretch/sid:

#ifdef PSTOEDITLIBDIR
    if (!pluginsloaded) {
      // also try to load drivers from the PSTOEDITLIBDIR
      loadPlugInDrivers(PSTOEDITLIBDIR, errstream,verbose);
      pluginsloaded = true;
    }
#endif

At first sight this looks somewhat sensible but reading the code more deeply reveals that "pluginsloaded = true;" is set earlier even if no plugins were found in the previous places tried. Therefore the stretch/sid version never tries to load plugins from PSTOEDITLIBDIR.

The attatched debdiff restores the 3.62 behaviour (i.e. removes the if statement) and allows plugins to load successfully (tested in raspbian stretch but I don't see any reason why it wouldn't work in Debian ).

I have uploaded this fix to raspbian, no intent to NMU in Debian.
diff -Nru pstoedit-3.70/debian/changelog pstoedit-3.70/debian/changelog
--- pstoedit-3.70/debian/changelog      2016-01-22 12:50:20.000000000 +0000
+++ pstoedit-3.70/debian/changelog      2016-02-11 02:21:05.000000000 +0000
@@ -1,3 +1,11 @@
+pstoedit (3.70-1+rpi1) stretch-staging; urgency=medium
+
+  * Disable broken if-check in plugin load code so that plugins
+    can be successfully loaded from PSTOEDITLIBDIR.
+    (Closes: #813316)
+
+ -- Peter Michael Green <plugw...@raspbian.org>  Thu, 11 Feb 2016 02:20:11 
+0000
+
 pstoedit (3.70-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru pstoedit-3.70/debian/patches/05-fix-plugin-loading.patch 
pstoedit-3.70/debian/patches/05-fix-plugin-loading.patch
--- pstoedit-3.70/debian/patches/05-fix-plugin-loading.patch    1970-01-01 
00:00:00.000000000 +0000
+++ pstoedit-3.70/debian/patches/05-fix-plugin-loading.patch    2016-02-11 
02:25:28.000000000 +0000
@@ -0,0 +1,22 @@
+Description:  Disable broken if-check in plugin load code so that plugins  can 
be successfully loaded from PSTOEDITLIBDIR.
+ The plugin load code was checking pluginsloaded before trying to load plugins 
from PSTOEDITLIBDIR
+ Unfortunately code further up in the method sets pluginsloaded even if no 
plugins were found in
+ previous places. This patch restores the old 3.62 behaviour of not checking 
pluginsloaded before
+ searching for plugins in PSTOEDITLIBDIR.
+Bug-Debian: http://bugs.debian.org/813316
+--- pstoedit-3.70.orig/src/pstoedit.cpp
++++ pstoedit-3.70/src/pstoedit.cpp
+@@ -282,11 +282,11 @@ static void loadpstoeditplugins(const ch
+       }
+ 
+ #ifdef PSTOEDITLIBDIR
+-      if (!pluginsloaded) {
++      //if (!pluginsloaded) {
+         // also try to load drivers from the PSTOEDITLIBDIR
+         loadPlugInDrivers(PSTOEDITLIBDIR, errstream,verbose);
+         pluginsloaded = true;
+-      }
++      //}
+ #endif
+ 
+       // delete[]plugindir;
diff -Nru pstoedit-3.70/debian/patches/series 
pstoedit-3.70/debian/patches/series
--- pstoedit-3.70/debian/patches/series 2016-01-22 15:03:54.000000000 +0000
+++ pstoedit-3.70/debian/patches/series 2016-02-11 02:22:42.000000000 +0000
@@ -2,3 +2,4 @@
 02-errors-to-stderr.patch
 03-doc-remove-nonfree-options.patch
 04-fix-obsolete-LIBPNG_LDFLAGS.patch
+05-fix-plugin-loading.patch

Reply via email to