aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-10-06 09:37:19 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-10-23 11:18:07 -0700
commit4e44e118bec33d1c8b5b22714ceacf5dd6462d6d (patch)
tree5b7cf86cf869d9603463bb7332781d3c2779510f
parent6c1e44b950e64588c403510a9f20048f2d69d240 (diff)
downloadconsfigurator-4e44e118bec33d1c8b5b22714ceacf5dd6462d6d.tar.gz
use PUSHNEW-HOSTATTRS when propagating :DATA hostattrs
This prevents multiple attempts to upload the same item of prerequisite data. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/deployment.lisp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/deployment.lisp b/src/deployment.lisp
index fe56a7a..444972a 100644
--- a/src/deployment.lisp
+++ b/src/deployment.lisp
@@ -328,10 +328,12 @@ different user."
(setf (getf (slot-value host 'hostattrs) :data) nil)
(setq host (preprocess-host host))
(doplist (k v (hostattrs host))
- (loop with root = (get-hostattrs k)
- for cell on v until (eq cell root)
- collect (car cell) into accum
- finally (apply #'push-hostattrs k (nreverse accum))))
+ (loop with root = (get-hostattrs k)
+ for cell on v until (eq cell root)
+ collect (car cell) into accum
+ finally (if (eql k :data)
+ (pushnew-hostattrs :data (nreverse accum))
+ (apply #'push-hostattrs k (nreverse accum)))))
(dolist (system (propspec-systems (host-propspec host)))
(pushnew system (slot-value (host-propspec *host*) 'systems)))
(setf (getf properties :host) host)))
@@ -346,8 +348,7 @@ different user."
(defun %propagate-hostattrs (host)
(dolist (system (propspec-systems (host-propspec host)))
(pushnew system (slot-value (host-propspec *host*) 'systems)))
- (dolist (attr (get-hostattrs :data host))
- (push-hostattrs :data attr)))
+ (pushnew-hostattrs :data (get-hostattrs :data host)))
(defprop evals :posix (&rest forms)
"Property which just evaluates each of FORMS using EVAL. Only for testing