Hi Ole:

On 2017-07-13 09:12+0200 Ole Streicher wrote:

Then, there is one remaining patch that may be interesting for you
(attached). I have however no idea about it; it is a remnant from the
past. Could you give me a hint whether it is needed for me or for you?

From some digging with "git log" and "git blame" in the debian
subdirectory of the PLplot repository, it appears
debian/patches/proper-path-handling.diff has different metadata
and name _but the same contents_ as the patch you are concerned about.
And debian/changelog has the following comment about that
patch:

* Adjust the upstream code for working with Octave 3.6.1, by adding the
  following patches:

  + debian/patches/replace-deprecated-split.diff
  + debian/patches/proper-path-handling.diff
  + debian/patches/fix-boolean-operators.diff

Later on with the commit message "Remove obsolete debian patches." the
first and third of those three patches were removed, but the
proper-path-handling.diff patch remained as of commit
68e499b4ca^ (where commit 68e499b4ca was where I recently removed
the whole debian subdirectory).

The patch is for the bindings/octave/PLplot/toggle_plplot_use.m file
which we do not currently test in any automated way. That octave
function is apparently designed to toggle between native plot
functionality and the equivalent PLplot functionality.  Furthermore,
that function is currently designed to be used only for the installed
case where our various octave support files (*.m files) are installed in a
more rational set of directories than the build-tree case.

So I tested toggle_plplot_use.m as follows:

make -j4 install

# N.B. All tests below need to build nothing further and just refer to what
# is installed by the above make command.

# octavedir holds the appropriate octave installation directories for PLplot
# which will be used in a later octave run.  Note the installation
# prefix here, /home/software/plplot/installcmake/, will have to be
# changed if anyone else wants to follow this test procedure.

export \
octavedir="/home/software/plplot/installcmake/share/plplot_octave":"/home/software/plplot/installcmake/share/plplot_octave"/support:"/home/software/plplot/installcmake/share/octave/site/m"/PLplot:"/home/software/plplot/installcmake/lib/octave":/home/software/plplot/installcmake/share/plplot5.12.0/examples/octave/

# Test that non-PLplot (native) plotting works fine for octave.

irwin@raven> octave -f -q
octave:1> x=-pi:0.1:pi;
octave:2> plot(x,sin(x));
octave:3> exit

# Test that PLplot plotting works fine for octave (this is where we
use octavedir) with plplot_stub (which changes the plot environment to
the PLplot variant).

irwin@raven> octave -f -q
octave:1> warning("off","Octave:shadowed-function");
octave:2> addpath(getenv("octavedir"));
octave:3> plplot_stub;
octave:4> x=-pi:0.1:pi;
octave:5> plot(x,sin(x));
octave:6> exit

# Test of toggle_plplot_use to switch from PLplot to native plotting
irwin@raven> octave -f -q
octave:1> warning("off","Octave:shadowed-function");
octave:2> addpath(getenv("octavedir"));
octave:3> plplot_stub;
octave:4> toggle_plplot_use;
Use PLplot: on
octave:5> x=-pi:0.1:pi;
octave:6> plot(x,sin(x));
octave:7> toggle_plplot_use;
Use PLplot: off
octave:8> plot(x,sin(x));
octave:9> exit
error: closefig: A(I): index out of bounds; value 3 out of bound 1
error: called from:
error:   /home/software/plplot/installcmake/share/plplot_octave/closefig.m at 
line 40, column 5
error:   /home/software/plplot/installcmake/share/plplot_octave/closeallfig.m 
at line 33, column 7

The above worked (i.e., generated both a PLplot type of plot
originally but followed with a native type of plot at the end, but
generated those error messages on exit.  Furthermore,
other attempts to use toggle_plplot_use for switching back and
forth between the two plot enviroments either did not work or
ended up as segfaults.

I then modified that installed version of toggle_plplot_use.m
using the latest version (commit 68e499b4ca^) of 
debian/patches/proper-path-handling.diff
that exists in our repository.  That patch applied cleanly, i.e.,

software@raven> patch -p1 /home/software/plplot/installcmake/share/octave/site/m/PLplot/toggle_plplot_use.m /tmp/proper-path-handling.diff patching file /home/software/plplot/installcmake/share/octave/site/m/PLplot/toggle_plplot_use.m

but makes the corresponding octave toggle_plplot_use command unusable, i.e.,

octave:6> toggle_plplot_use;
error: sq_string cannot be indexed with {
error: evaluating argument list element number 1
error: called from:
error: 
/home/software/plplot/installcmake/share/octave/site/m/PLplot/toggle_plplot_use.m
 at line 42, column 3

So from these tests, unpatched toggle_plplot_use.m is problematic (it
sort of works with Octave-3.8.2, but there are issues including segfaults 
sometimes), but
patching it with this patch makes it not work at all!  So I suspect
when Rafael implemented this patch years ago, he never tested it, and
I guess the Debian users of this package never tried the
toggle_plplot_use command either (or gave up on it when it immediately
errored out as above).

Anyhow, Ole, if you can replicate the above tests (both without and
with the patch) using octave-4, then I suspect your decision will be
to drop this patch entirely.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to