On 19 March 2012 06:46, Juan Pablo Carbajal <carba...@ifi.uzh.ch> wrote: > 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. >> > 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.
I didn't commit the post_install.m file because it was hardcoded. The content of the file was function post_install (desc) [err, msg] = unlink ("/home/carandraug/octave/io-1.0.18/i686-pc-linux-gnu-api-v48+/PKG_ADD"); endfunction ------------------------------------------------------------------------------ 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