Open cbm755 opened 5 years ago
What do you get for pkj world
? That will show you all the InstallationDirs and their associated index files. I suspect that what's happening is that the index file from your old default location is still around, and pkj
is picking that up, whereas pkg
is using only the index file for your new custom location.
Perhaps when the user has a custom prefix set, that should de-activate the default user
location in pkj
's view of the world. Or perhaps a custom prefix should just change the path that the user
location uses, instead of introducing a new custom
location.
>>> pkj world
packajoozle.internal.InstallWorld: user, global, custom (default=custom)
user:
prefix: /home/cbm/octave
arch_prefix: /home/cbm/octave
index_file: /home/cbm/.octave_packages
default package_list_var_name: local_packages
actual package_list_var_name: local_packages
global:
prefix: /home/cbm/.octavehg/share/octave/packages
arch_prefix: /home/cbm/.octavehg/lib/octave/packages
index_file: /home/cbm/.octavehg/share/octave/octave_packages
default package_list_var_name: global_packages
actual package_list_var_name: global_packages
custom:
prefix: /home/cbm/.local/share/octpkgs/6.0.0
arch_prefix: /home/cbm/.local/share/octpkgs/6.0.0
index_file: /home/cbm/.local/share/octpkgs/6.0.0/octave_packages
default package_list_var_name: local_packages
actual package_list_var_name: local_packages
I certainly don't expect /home/cbm/octave
to appear there. But maybe my customization are incorrect somehow:
%% I want to store my packages in version-specific dirs
tmp_pkg_path = fullfile(getenv('HOME'), '.local/share/octpkgs/', ver('octave').Version);
mkdir(tmp_pkg_path); % oct 6 needs this?
pkg('prefix', tmp_pkg_path, tmp_pkg_path);
pkg('local_list', fullfile(tmp_pkg_path, 'octave_packages'));
clear tmp_pkg_path
I certainly don't expect /home/cbm/octave to appear there. But maybe my customization are incorrect somehow
No, your customizations are fine; it's probably Packajoozle that needs to change to match your expectations.
Right now, if a user customizes their pkg prefix
, Packajoozle views that as a third, new prefix/place:
user
- always points to the default location for user installationsglobal
- always points to the default location for global installationscustom
- appears if the user has customized pkg prefix
, and appears as an independent installation place, leaving user
and global
in place with their default pathsThis is in line with Packajoozle's support for arbitrary additional installation places. But doesn't seem to be in line with pkg
's behavior, or user expectations.
It sounds to me like a customized pkg prefix
should not be treated as a new third place, but rather should be treated as an alteration of where the user
place lives on disk. That way, stuff left in the old default user
place will not show up in list
output, and won't be involved in dependency resolution: only octave
sessions that are using the default user
location will see it. Does that sound better to you?
Many of those
InstallationDir
s are nonexistent, leftover from before I changed all myprefix
stuff to put my packages in version-specific subdirs of.local/share
... Not sure where pkj is finding this stuff:pkg list
does not show them.