From 4e44e118bec33d1c8b5b22714ceacf5dd6462d6d Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 6 Oct 2021 09:37:19 -0700 Subject: use PUSHNEW-HOSTATTRS when propagating :DATA hostattrs This prevents multiple attempts to upload the same item of prerequisite data. Signed-off-by: Sean Whitton --- src/deployment.lisp | 13 +++++++------ 1 file 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 -- cgit v1.2.3