aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-02-27 15:07:12 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-02-27 15:07:12 -0700
commit949abfab79922c5673d37bd142559c52faa4767c (patch)
tree1e4375810668425bb18a079376dad7f0e6c5d7e1
parent60d708c289a4ad547bc58e6cf33c2b8bb53b2da4 (diff)
downloadconsfigurator-949abfab79922c5673d37bd142559c52faa4767c.tar.gz
store record of remote cache in field of *CONNECTION*
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/connection.lisp4
-rw-r--r--src/data.lisp6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/connection.lisp b/src/connection.lisp
index b6a23fa..0ba08a6 100644
--- a/src/connection.lisp
+++ b/src/connection.lisp
@@ -55,7 +55,9 @@ For an example of usage, see the :SUDO connection type."))
((parent
:initform *connection*
:documentation
- "The value of *CONNECTION* at the time this connection was established.")))
+ "The value of *CONNECTION* at the time this connection was established.")
+ (cached-data
+ :initform nil)))
(defclass lisp-connection (connection) ())
diff --git a/src/data.lisp b/src/data.lisp
index 3ed4069..c6e5246 100644
--- a/src/data.lisp
+++ b/src/data.lisp
@@ -280,9 +280,7 @@ appropriate. Falls back to CONNECTION-WRITEFILE."
(mrun "mkdir" "-p" (pathname-directory-pathname *dest*))
(format t "Uploading (~@{~S~^ ~}) ... " iden1 iden2 data-version)
(call-next-method)
- ;; TODO eliminate *{THIS,LAST}-HOP-INFO* and just store this in a field
- ;; of *CONNECTION*
- (push (list iden1 iden2 *dest*) (getf *this-hop-info* :cached-data))
+ (push (list iden1 iden2 *dest*) (slot-value *connection* 'cached-data))
(format t "done.~%"))))
(defmethod connection-upload-data ((data file-data))
@@ -391,7 +389,7 @@ Called by connections which start up remote Lisp images."
(lambda (d)
(string= (car d) "--lisp-system")
(string= (cadr d) (normalise-system system)))
- (getf *this-hop-info* :cached-data))))))
+ (slot-value *connection* 'cached-data))))))
(*package* (find-package "COMMON-LISP-USER")))
;; need line breaks in between so that packages exist before we try to
;; have remote Lisp read sexps containing symbols from those packages