Mercurial > jwe > octave
diff scripts/pkg/private/install.m @ 29467:280defaf2023
pkg.m: Install local packages in version dependent path (bug #58299).
* scripts/pkg/pkg.m: Store local package list in (platform-specific) version
dependent path.
* scripts/pkg/private/default_prefix.m: Change the default local package
installation location to a (platform-specific) version dependent path.
* doc/interpreter/package.txi: Adapt documentation.
* scripts/pkg/private/install.m: Create directory for local package list if it
doesn't exist yet.
* libinterp/corefcn/toplev.cc (__octave_config_info__): Add
OCTAVE_MAJOR_VERSION, OCTAVE_MINOR_VERSION, and OCTAVE_PATCH_VERSION to
output.
* libinterp/corefcn/defaults.cc (Fuser_config_dir, Fuser_data_dir): Add new
functions to query platform-specific path for user data and user configuration
files.
* doc/interpreter/system.txi: Add docstrings of new functions to manual.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 21 Mar 2021 18:10:14 +0100 |
parents | 7854d5752dd2 |
children | 796f54d4ddbf |
line wrap: on
line diff
--- a/scripts/pkg/private/install.m Mon Mar 22 21:09:04 2021 +1100 +++ b/scripts/pkg/private/install.m Sun Mar 21 18:10:14 2021 +0100 @@ -282,6 +282,11 @@ if (ispc) local_packages = standardize_paths (local_packages); endif + if (! exist (fileparts (local_list), "dir") + && ! mkdir (fileparts (local_list))) + error ("Octave:pkg:install:local-dir", ... + "pkg: Could not create directory for local package configuration"); + endif save (local_list, "local_packages"); installed_pkgs_lst = {local_packages{:}, global_packages{:}}; endif