Thu 06 Jan 2011 10:59:08 PM UTC, comment #5:
These variables are persistent to allow something like
pkg prefix /usr/share/octave/packages/ /usr/lib/octave/packages
pkg install mypackage.tar.gz
to work over the two calls to pkg. So once the user sets these they stick. This means that the call that debain makes in octaverc sticks as well. It also has the side-effect of removing the distinction between a local and global install of a package, so the "-local" and "-global" flags will do nothing.
John if you instead do
pkg prefix ~/octave ~/octave
so that both the prefix and archprefix variables are set, I think you'll find this works.
However, should we have a way to define the default package location rather than hardcode it in pkg.m so that debian can set the system package directories to be where they want them without removing the capacity for the users to install the packages locally?
Something like
pkg prefix -default /usr/share/octave/packages/3.2 /usr/lib/octave/packages/3.2;
which would then overwrite prefix and archprefix, saves them as a system default value so that -global/-local can toggle between the default system prefix and the local user prefix, without marking the change as having defined a new user prefix.
I attach a patch as an idea of what I mean.
D.
PS: This isn't an octave-forge bug as pkg is a core function of Octave.
(file #22366)
|