On Sun, Mar 25, 2012 at 6:20 PM, c. <carlo.defa...@gmail.com> wrote:
>
> On 25 Mar 2012, at 18:07, Juan Pablo Carbajal wrote:
>
>> Maybe this is too much work, but I guess rebuild should work as follows:
>> 1. Parse ~/.octave_packages file to get all folders set at
>> installation time (i.e. get the right prefix for each package)
>> 2. Rebuild accordingly
>> 3. Replace  ~/.octave_packages
>
> actually the idea of "pkg rebuild" is to fix a broken/missing 
> ~/.octave_packages
> so step 1. does not make sense.
>
> IIRC, rebuild works the other way round:
>
> 1. get dir = pkg ("prefix")
> 2. look for packages in dir and parse DESCRIPTION and INDEX in 
> dir/package/packinfo
> 3. rebuild ~/.octave_packages
>
> you can check here
>
> http://hg.savannah.gnu.org/hgweb/octave/file/351ca094580b/scripts/pkg/private/rebuild.m
>
> c.

But pkg("prefix") would give just the prefix in the current session,
not the one used at installation time[1]. That is if the user quits
Octave after installing, then rebuild wont fix anything. I thought
rebuild was more fix corrupted compiled objects.

As it is this methinks rebuild is more a reset, since it wont work
across Octave sessions. Now, to have prefixes that survive across
section we need to have a db we can trust.. if ~/.octave_packages is
not to be trusted what file can be?

[1] This means rebuild suffers the same "bug" as the PKG_ADD under discussion.

-- 
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