2012/3/19 Carnë Draug <carandraug+...@gmail.com>:
> On 19 March 2012 00:54, Carnë Draug <carandraug+...@gmail.com> wrote:
>> On 18 March 2012 15:23, Philip Nienhuis <pr.nienh...@hccnet.nl> wrote:
>>> I tried to update the linear-algebra package as ordinary user and that
>>> proceeds OK as well; so I conclude there's something wrong in the io pkg
>>> setup in the ./src subdir.
>>
>> Actually the problem seems to be with PKG_ADD as it installs fine if I
>> remove it. I don't have experience with it and the documentation isn't
>> very helpful either. I'm trying to look at pkg.m source and see how it
>> works exactly. It appears to me that when installing the package, a
>> PKG_ADD file is added to both the .m and .oct directories and the
>> scripts are ran before the package is loaded. However, since there's
>> no chk_spreadsheet_support script inside the .oct directory it fails
>> (remember the package is not loaded yet and therefore the function is
>> not on the seach path). At least that's what I think is happening.
>>
>> I tried to test this by not making the package autoload but that
>> doesn't solve the problem so maybe it's not that. I'll keep
>> investigating.
>
> I've been looking into this for a while (all the try catch blocks in
> pkg don't make it much easy) and here's what I found thus far:
>
>  * the reason why the error still occurs even when autoload is off is
> because pkg always loads the package at the end of an installation for
> a short while to generate a cache for documentation
>  * removing the java package solves the problem sincee
> chk_spreadsheet_support never gets called that way (this took me a
> while to understand because I kept getting the same error even after
> removing the src/ directory)
>
> I don't understand why you only get the error when you run it as
> normal user and not as root, that kind of error doesn't validate my
> hypothesis of being a problem of using a function that is not loaded
> yet. It kind points to some problem with pkg prefix (or something that
> uses it).
>
> I have created a post_install script that removes the file and that
> solves the problem (I have hardcoded the path but I think it's
> possible to guess it with pkg). However, it seems to me that the best
> approach is to fix something in octave-core. Or maybe not. Maybe it
> doesn't make sense to have PKG_ADD calling a function that belongs to
> the package that is gonna be loaded.
>
> Carnë
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Octave-dev mailing list
> Octave-dev@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/octave-dev

Hi,

I cannot reproduce the problem. I tried several ways of installing io
from svn. All of them work. I see no pre_install.m function.

As I see it,  the problem is the following. The compilation and
PKG_ADD are called from a machine dependent folder. The path to the
installed folder (usually a folder above in the tree, unless you have
used the -prefix option) is not loaded yet.
Before the call to chk_spreadsheet_support you could addpath and then
remove it (though maybe it doesn't collide with anything if you leave
ii there).

You can get some ideas from the ADD_PKG in main/geometry, which is
meant to solve a similar problem.

-- 
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to