From 1f12dfda4aeb6d08af454d60caa5985b2bd5b1ba Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 28 Aug 2021 15:54:18 -0700 Subject: cache XDG_CACHE_HOME as a connattr This should provide a performance improvement. Signed-off-by: Sean Whitton --- src/property/installer.lisp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/property/installer.lisp') diff --git a/src/property/installer.lisp b/src/property/installer.lisp index 2830703..38b5ce9 100644 --- a/src/property/installer.lisp +++ b/src/property/installer.lisp @@ -265,16 +265,15 @@ using a combinator like ON-CHANGE, or applied manually with DEPLOY-THESE." ;; OS's actual XDG_CACHE_HOME. Move cache & update environment. (let ((source (chroot-pathname - (merge-pathnames "consfigurator/" - (ensure-directory-pathname - (or (getenv "XDG_CACHE_HOME") - (strcat (getenv "HOME") "/.cache/")))) + (merge-pathnames + "consfigurator/" (get-connattr :XDG-CACHE-HOME)) old-os))) (when (directory-exists-p source) (rename-file source (ensure-directories-exist #P"/root/.cache/consfigurator/")))) - (setf (get-connattr :remote-user) "root") - (setf (get-connattr :remote-home) "/root") + (setf (get-connattr :remote-user) "root" + (get-connattr :remote-home) "/root" + (get-connattr :XDG-CACHE-HOME) #P"/root/.cache/") (posix-login-environment "root" "/root") ;; Remount (mainly virtual) filesystems that other properties we will -- cgit v1.2.3