octave-maintainers
[Top][All Lists]
Advanced

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

Relocatable packages?


From: Benjamin Lindner
Subject: Relocatable packages?
Date: Fri, 15 Jun 2007 10:16:00 +0200

In the process of putting the pieces for the mingw32 build together
I stumbled over the fact that apparently octave itself is relocatable
(provided you keep the directory tree structure) since paths are
relative to OCTAVE_HOME, but the packages are not.
You must at least call "pkg rebuild" when moving octave

I feel that this is an unneccesary restriction, since 
1) you need write access to the octave tree - this way you'll never be 
able to run octave e.g. from a cd/dvd, which would be a really cool 
feature IMO (something like a "Octave Live")
2) the need for an "initialization" of the installation/copy is a 
hindrance in portability, e.g. having octave on a portable drive or 
USB stick with changing drive letters/mount points in win32. This
works for octave alone, but breaks as soon as you include the first
package.

What I'd like to have ultimately is a binary package that does not
essentially have to be installed, but can be simply downloaded and
unzipped and voila!

A "portable octave" would also be a cool feature to have on windows
(packaging it completely with a compiler and msys environment and an 
editor and forge-packages and ... and all in an "atomic" package that
can be moved/copied without the need for installations ...
just getting visionary now)

So I started and took a look into pkg.m, but I was at totally lost.
The file is huge and packed with intermeshed functions and - frankly
said - I didn't get an idea where to start.

Apparently there are two database files in binary format, which 
contain info on installed/loaded packages. 
And apparently the installation paths are hardcoded into it.

My idea was to have an additional flag telling if the global packages 
(it doesn't make sense for local packages, does it?) are located 
at the default location and if so, then the paths to the packages 
are only specifyed relative to OCTAVE_HOME (not absolute) and are 
reconstructed at runtime when addpath() is executed.
So my question is:
a) is this in principle possible with the current package manager?
b) if so, I'd be grateful for hints where to hook it in, since I'm a bit
lost by the complexity of the pkg-code. 

Is there some documentation on the details of the package manager 
interna? I looked at the manual chapter on packages, but it doesn't
help in this case

benjamin

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail


reply via email to

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