aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-07-01 13:39:39 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-07-06 21:18:26 -0700
commit646585a7a79f3ff6b8f5fc413b87f0903f3c2151 (patch)
treebd833a6a3aec380505b36894c53398dd1fb49c92
parent3c92310593f8b1fce7b63051dce150fcf5300f75 (diff)
downloadconsfigurator-646585a7a79f3ff6b8f5fc413b87f0903f3c2151.tar.gz
MAKE-PROPSPEC: propagate *CONSFIG* even when propspec expression nil
Previously, MAKE-PROPSPEC would store nil for the SYSTEMS slot in the case where the PROPSPEC argument was nil. The idea behind this was that if there are no properties to apply, then there is no need to load any ASDF systems. However, the SYSTEMS slot is how a HOST value containing the propspec records the systems required not just to apply its properties, but also what's required to instantiate all of its hostattrs. For example, when some of these hostattrs are CLOS objects, the classes of those objects must be loaded. So don't set SYSTEMS to nil just because the propspec expression is nil. Also see edbba484918f6de83680a5b29e561fba981e05e9. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/deployment.lisp3
-rw-r--r--src/host.lisp3
-rw-r--r--src/propspec.lisp2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/deployment.lisp b/src/deployment.lisp
index 22a1458..68acdd0 100644
--- a/src/deployment.lisp
+++ b/src/deployment.lisp
@@ -237,7 +237,8 @@ for testing properties at the REPL. See also EVALS."
(run-program '("id") :output :string)))
(,hostname (hostname-f))
(,host (or (symbol-value (find-symbol (string-upcase ,hostname)))
- (make-host :hostattrs `(:hostname (,,hostname))))))
+ (make-host :hostattrs `(:hostname (,,hostname))
+ :propspec (make-propspec :systems nil)))))
(deploy-these*
`((:sudo :as ,(format nil "~A@~A" ,username ,hostname)))
,host
diff --git a/src/host.lisp b/src/host.lisp
index a5efd40..477ac09 100644
--- a/src/host.lisp
+++ b/src/host.lisp
@@ -54,7 +54,8 @@
(:method ((host host))
host)
(:method ((hostname string))
- (make-host :hostattrs `(:hostname (,hostname)))))
+ (make-host :hostattrs `(:hostname (,hostname))
+ :propspec (make-propspec :systems nil))))
(defmethod shallow-copy-host ((host host))
(make-instance (type-of host)
diff --git a/src/propspec.lisp b/src/propspec.lisp
index 81e50a2..e1607af 100644
--- a/src/propspec.lisp
+++ b/src/propspec.lisp
@@ -178,7 +178,7 @@ PRINT-OBJECT."))
"Convert a property application specification expression into a property
application specification proper by associating it with a list of ASDF
systems."
- (if (or systems-supplied-p (not propspec))
+ (if systems-supplied-p
(make-instance 'unpreprocessed-propspec
:systems systems :propspec propspec)
(make-instance 'unpreprocessed-propspec :propspec propspec)))