octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

In what stage of OF package loading/unloading are PKG_ADD/PKG_DEL called


From: PhilipNienhuis
Subject: In what stage of OF package loading/unloading are PKG_ADD/PKG_DEL called?
Date: Wed, 8 Jan 2014 08:33:48 -0800 (PST)

In response to this thread:

http://octave.1599824.n4.nabble.com/Forge-IO-still-gives-error-td4660735.html

I'm busy finding out how to get more reliable loading of Java class libs for
the io package using PKG_ADD/PKG_DEL. Using those is ideally suited for
those Java class libs as they're only required when the io package is
loaded.
In case of the io package, PKG_ADD and PKG_DEL invoke scripts from the io
package itself. That seems to give issues.

On Windows there are no problems (AFAICS) as long as PKG_ADD is in the
arch-dependent package subdir (<libdir>/octave/packages/<package>/<arch>)
and PKG_DEL is in the scripts subdir itself (not in its packinfo subdir),
i.e. share/octave/packages/<package>.  This works beautifully; by adding
"keyboard" statements in PKG_ADD & PKG_DEL I could verify that the io script
dir was already, or still, in Octave's search path.

Again on Windows, having PKG_ADD and PKG_DEL elsewhere, e.g., in the script
packinfo/ subdir doesn't work, they won't get called.  (ISTR that some
(long) time ago, in 3.6.x series, having PKG_ADD in <scripts>/packinfo/
*did* work.)

On Linux, the PKG_ADD/PKG_DEL mechanism doesn't work so reliably, cf. the
abovementioned thread.

I tried to follow the logic in pkg.m, private/unload_packages.m,
load-path.cc and its internal functions execute_pkg_add() and
execute_pkg_del(). There must be a clear order (no simultaneous threads
AFAICS), but I can't assess when exactly those scripts are called.

What I'm after is a way to have the io script dir (in
share/octave/packages/io) already/still in Octave's search path while
PKG_ADD and PKG_DEL are called, resp. 
How can that be achieved (reliably)?

Thanks,

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/In-what-stage-of-OF-package-loading-unloading-are-PKG-ADD-PKG-DEL-called-tp4660804.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]