Tue 22 Mar 2016 11:14:51 PM UTC, comment #3:
Apologies Carnë, I didn't note you had supplied an attachment with the first post.
The bug title is misleading, I figured it was about octave_config_info, but your patch is really about PKG_ADD.
Tonight, in spite of what I wrote earlier, I already locally fixed:
- PKG_ADD/PKG_DEL issues (using _io_init_.m and _io_exit_.m with PKG_ directives), they work fine.) I didn't know it was so easy. post_install.m, PKG_ADD and PKG_DEL are gone.
(I think a link to the wiki (http://wiki.octave.org/Creating_packages) on the developers page on Octave-Forge wouldn't hurt; I just stumbled on that wiki page by accident. The discussion between you and me went so far because I never knew about the exact way pkg.m works and how it installs / initializes / loads packages. Your bug report on bug #47481 supplied the final piece I was missing all along.)
- Many octave_config_info occurrences, also in the _io_init_ / _io_exit_ files.
The JAVA ones are all done, the ENABLE_64 / USE_64_BIT_IDX_T ones not as the latter form (for older Octaves) just don't work with _have_feature_().
I haven't built 64-bit indexing Octave recently so I'm not sure if ENABLE_64 works reliably.
- libdir is more enigmatic. On *nix it is usually /usr/bin, on Windows [OCTAVE_HOME filesep "lib"], but I consider this not very robust. And I don't know what it is in cygwin and on Mac OSX.
That is the very reason octave_config_info is so sweet - it just returns the required info without "if windows elseif osx elseif cygwin else <*nix>" constructs on the user side.
OTOH libdir is used in io just to search Java .jar files; there's no guarantee they'll be in the libdir or subdirs. Some Linux distros keep them there, but Mac OSX or cygwin? And on Windows it is especially uncertain. I even disabled it for *nix after a bug report about delays but in fact that was more because searching the OpenOffice .jars took so ridiculously long.
My stuff is already in my local repo, I'll test it tomorrow on Linux and if I don't hit issues I'll push.
Hopefully that eases your mind :-)
|