[Pkg-octave-devel] Packages with PKG_ADD fail to build

Rafael Laboissiere rafael at debian.org
Sun Mar 30 21:14:46 UTC 2008


* Thomas Weber <thomas.weber.mail at gmail.com> [2008-03-30 22:53]:

> On 30/03/08 19:12 +0200, Rafael Laboissiere wrote:
> > I think that this happens during the initialization of the load path.  Since
> > "." comes first in the path, Octave tries to load the PKG_ADD file that it
> > finds there.  Unfortunately, the other components are not yet in the path at
> > this time, and Octave fails because functions like fullfile are not found.
> 
> I wonder if this is a bug or not? The current behavious makes it
> impossible to have any sensible PKG_ADD file in the startup directory.

It is a probably a bug, but it should happen so rarely that I doubt the
Octave developers will be willing to "fix" it.  It is happening in our case
because we are running pkg from the unpacked directory.  We might try to
approach the octave-forge developers and ask them to move the PKG_ADD file
into a sub-directory.


> > BTW, adding the following at the beginning of PKG_ADD fixes the problem:
> > 
> >      addpath (genpath ("/usr/lib/octave/3.0.0/oct"), "-begin");
> >      addpath (genpath ("/usr/share/octave/3.0.0/m"), "-begin");
> 
> Mhm, we could write a Perl script, inserting this into every PKG_ADD
> file ... just kidding :)

You are kidding, but I have already considered this possibility, really :-)

Another possibility is to rename PKG_ADD just before calling octave and
renaming after it back to the original name.

-- 
Rafael



More information about the Pkg-octave-devel mailing list