aboutsummaryrefslogtreecommitdiff
path: root/src/connection.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-10-09 12:55:46 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-10-23 12:30:17 -0700
commitdee05622a94e2803d232892b376aba70328c21e6 (patch)
treebc51a8edee0db1a3f0109e40ca760997ac3a45e0 /src/connection.lisp
parent720ee21a0905d36cf29af49ce8b6d572296dddb6 (diff)
downloadconsfigurator-dee05622a94e2803d232892b376aba70328c21e6.tar.gz
replace some functions with a new :CONSFIGURATOR-CACHE connattr
This simplifies the API. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection.lisp')
-rw-r--r--src/connection.lisp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/connection.lisp b/src/connection.lisp
index b7a5cb6..370d146 100644
--- a/src/connection.lisp
+++ b/src/connection.lisp
@@ -252,6 +252,11 @@ login(1)). Tilde expansion works correctly."
(merge-pathnames ".cache/"
(connection-connattr connection :remote-home)))))
+(defmethod connection-connattr
+ ((connection connection) (k (eql :consfigurator-cache)))
+ (merge-pathnames "consfigurator/"
+ (connection-connattr connection :XDG-CACHE-HOME)))
+
;;;; Functions to access the slots of the current connection
@@ -603,10 +608,6 @@ specification of POSIX ls(1))."
0))
(failed-change "Could not determine time of remote's last reboot."))))
-(defun remote-consfigurator-cache-pathname (path)
- (merge-pathnames
- path (merge-pathnames "consfigurator/" (get-connattr :XDG-CACHE-HOME))))
-
(defun remote-executable-find (executable)
(zerop (mrun :for-exit "command" "-v" executable)))