aboutsummaryrefslogtreecommitdiff
path: root/src/host.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-24 13:52:09 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-24 13:53:51 -0700
commit0757caa94c359a475ab39ff35a7e1cf92bda5cdc (patch)
treeb94903a367927d6ab1d23def055acceedb2ad387 /src/host.lisp
parentee3ba287cc5faafbd35febac2fa9875eee067a49 (diff)
downloadconsfigurator-0757caa94c359a475ab39ff35a7e1cf92bda5cdc.tar.gz
move copying to the inside of {union,replace}-propspec-into-host
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/host.lisp')
-rw-r--r--src/host.lisp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/host.lisp b/src/host.lisp
index 7bb4669..602927b 100644
--- a/src/host.lisp
+++ b/src/host.lisp
@@ -94,23 +94,20 @@ Called by properties which set up such subhosts, like CHROOT:OS-BOOTSTRAPPED."
:propspec ,(slot-value host 'propspec)))
host)
-;; return values of the following two functions share structure, and thus are
-;; not safe to use except on host objects that were just made, or that are
-;; going straight into %CONSFIGURE
-
-(defmethod %union-propspec-into-host
+(defmethod union-propspec-into-host
((host unpreprocessed-host) (propspec propspec))
(make-instance 'unpreprocessed-host
- :hostattrs (hostattrs host)
+ :hostattrs (copy-list (hostattrs host))
:propspec (append-propspecs (host-propspec host) propspec)))
-(defmethod %replace-propspec-into-host
+(defmethod replace-propspec-into-host
((host unpreprocessed-host) (propspec unpreprocessed-propspec))
;; we have to preprocess HOST as functions that call us want the return
;; value to have all the hostattrs it would have were PROPSPEC not to be
;; substituted in
(make-instance 'unpreprocessed-host
- :hostattrs (hostattrs (preprocess-host host))
+ :hostattrs (hostattrs
+ (preprocess-host (shallow-copy-host host)))
:propspec propspec))
(defmacro defhost (hostname (&key deploy) &body properties)