Package: octave-plplot
Version: 5.10.0+dfsg-1
Severity: normal
Tags: patch


I've tryied to use plplot from Octave on Jessie. Octave and
octave-plplot are installed. Starting octave and running
"toggle_plplot_use cases the following problem:


octave:1> use_plplot
This function is deprecated.  Use toggle_plplot_use instead.
octave:2> toggle_plplot_use
error: sq_string cannot be indexed with {
error: evaluating argument list element number 1
error: called from:
error:   /usr/share/octave/site/m/PLplot/toggle_plplot_use.m at line 42,
column 3


Attached are to possible patches, each of them works on Octave 3.8.

patch_fix2_toggle_plplot_use.diff seems shorter and more elegant, though
I did not check compatibility with older versions of Octave.


Best regards,
  Alois



-- System Information:
Debian Release: 8.2
  APT prefers stable
  APT policy: (990, 'stable'), (80, 'testing'), (50, 'unstable'), (40,
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages octave-plplot depends on:
ii  libc6        2.19-18+deb8u1
ii  libgcc1      1:5.1.1-14
ii  liboctave2   3.8.2-4
ii  libplplot12  5.10.0+dfsg-1
ii  libstdc++6   5.1.1-14
ii  octave       3.8.2-4

octave-plplot recommends no packages.

octave-plplot suggests no packages.

-- no debconf information


--- toggle_plplot_use.orig.m	2015-12-04 08:38:15.728228972 +0100
+++ toggle_plplot_use1.m	2015-12-04 08:39:37.018874374 +0100
@@ -39,7 +39,7 @@
 use_plplot_path = plplot_octave_path;
 plplot_path_to_remove = char(strsplit(genpath(use_plplot_path),pathsep));
 for use_plplot_i=1:size(plplot_path_to_remove)(1)
-  rmpath(plplot_path_to_remove{use_plplot_i});
+  rmpath(strtrim(plplot_path_to_remove(use_plplot_i,:)));
 endfor
 
 if (strcmp (use_plplot_state, "on"))
--- toggle_plplot_use.orig.m	2015-12-04 08:38:15.728228972 +0100
+++ toggle_plplot_use2.m	2015-12-04 08:37:18.766375290 +0100
@@ -37,7 +37,7 @@
 endif
 
 use_plplot_path = plplot_octave_path;
-plplot_path_to_remove = char(strsplit(genpath(use_plplot_path),pathsep));
+plplot_path_to_remove = strsplit(genpath(use_plplot_path),pathsep);
 for use_plplot_i=1:size(plplot_path_to_remove)(1)
   rmpath(plplot_path_to_remove{use_plplot_i});
 endfor

Reply via email to