Commit b367fb43 authored by Eric Timmons's avatar Eric Timmons
Browse files

Update CLPM storage paths on Windows

parent 56a7b21b
Pipeline #3177 passed with stages
in 41 minutes and 18 seconds
......@@ -12,6 +12,9 @@
+ Added automated testing on Gitlab CI.
+ Added =clpm-client:*activate-asdf-integration*= to control default
integration with ASDF upon context activation.
+ The default directories for CLPM cache, config, and data have changed on
Windows. They are now =%LOCALAPPDATA%\clpm\cache\=,
=%LOCALAPPDATA%\clpm\config\=, and =%LOCALAPPDATA%\clpm\data\=.
Fixes from the aborted 0.3.6:
......
......@@ -18,7 +18,14 @@
cache home."
(setf *clpm-cache-root*
(or (uiop:getenv-absolute-directory "CLPM_CACHE_DIR")
(uiop:xdg-cache-home "clpm/"))))
(uiop:os-cond
((uiop:os-windows-p)
(uiop:resolve-absolute-location (list (uiop:get-folder-path :local-appdata)
"clpm"
"cache")
:ensure-directory t))
(t
(uiop:xdg-cache-home "clpm/"))))))
(defun clear-clpm-cache-root ()
"Clear the ~*clpm-cache-root*~ variable."
......
......@@ -19,7 +19,13 @@
(defun user-config-directories ()
"Returns the pathnames to the user's XDG default config directories."
(uiop:xdg-config-pathnames "clpm/"))
(append
(when (uiop:os-windows-p)
(list (uiop:resolve-absolute-location (list (uiop:get-folder-path :local-appdata)
"clpm"
"config")
:ensure-directory t)))
(uiop:xdg-config-pathnames "clpm/")))
(defparameter *default-clpm-config-directories*
(list 'user-config-directories
......
......@@ -18,7 +18,14 @@
home."
(setf *clpm-data-root*
(or (uiop:getenv-absolute-directory "CLPM_DATA_DIR")
(uiop:xdg-data-home "clpm/"))))
(uiop:os-cond
((uiop:os-windows-p)
(uiop:resolve-absolute-location (list (uiop:get-folder-path :local-appdata)
"clpm"
"data")
:ensure-directory t))
(t
(uiop:xdg-data-home "clpm/"))))))
(defun clear-clpm-data-root ()
"Clear the ~*clpm-data-root*~ variable."
......
......@@ -260,12 +260,14 @@
*** Config
CLPM's configuration is stored in the =clpm/= subfolder of your [[https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html][XDG]] config
directory. The typical locations for your XDG user config directory are:
On non-Windows systems, CLPM's configuration is stored in the =clpm/=
subfolder of your [[https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html][XDG]] config directory. On Windows, it is stored in the
=config/= subfolder of the clpm directory in your local app data
folder. Therefore, the typical locations are:
+ Linux :: =/home/$USER/.config/=
+ MacOS :: =/Users/$USER/.config/=
+ Windows :: =%LOCALAPPDATA%\config\=
+ Linux :: =/home/$USER/.config/clpm/=
+ MacOS :: =/Users/$USER/.config/clpm/=
+ Windows :: =%LOCALAPPDATA%\clpm\config\=
#+ATTR_REVEAL: :frag t
This can be overriden using the =CLPM_CONFIG_DIRS= environment variable.
......@@ -281,12 +283,16 @@
*** Cache
CLPM caches many files during its operation, including tarballs and package
metadata. These files are stored in the =clpm/= subfolder of your XDG cache
directory. The typical locations for your XDG cache directory are:
metadata.
+ Linux :: =/home/$USER/.cache/=
+ MacOS :: =/Users/$USER/.cache/=
+ Windows :: =%LOCALAPPDATA%\cache\=
On non-Windows systems, these files are stored in the =clpm/= subfolder of
your XDG cache directory. On Windows, it is stored in the =cache/=
subfolder of the clpm directory in your local app data folder. Therefore,
the typical locations are:
+ Linux :: =/home/$USER/.cache/clpm/=
+ MacOS :: =/Users/$USER/.cache/clpm/=
+ Windows :: =%LOCALAPPDATA%\clpm\cache\=
#+ATTR_REVEAL: :frag t
This location can be overriden using the =CLPM_CACHE_DIR= environment
......@@ -299,12 +305,16 @@
*** Data
CLPM stores context data, unpacked releases, metadata for installed
packages, etc. in the =clpm/= subfolder of your XDG data directory. The
typical locations for your XDG data directory are:
packages, etc. in its data directory.
On non-Windows systems, these files are stored in the =clpm/= subfolder of
your XDG data directory. On Windows, it is stored in the =data/= subfolder
of the clpm directory in your local app data folder. Therefore, the typical
locations are:
+ Linux :: =/home/$USER/.local/share/=
+ MacOS :: =/Users/$USER/.local/share/=
+ Windows :: =%LOCALAPPDATA%=
+ Linux :: =/home/$USER/.local/share/clpm/=
+ MacOS :: =/Users/$USER/.local/share/clpm/=
+ Windows :: =%LOCALAPPDATA%\clpm\data\=
#+ATTR_REVEAL: :frag t
This location can be overriden using the =CLPM_DATA_DIR= environment
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment