diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-05-07 18:38:58 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-05-09 12:21:56 -0700 |
commit | 8fa130526050c4d3bdfa5465e06180f813a71f3c (patch) | |
tree | 820ead2c6b33e12337bc6d3e453ff7b2c4b2f8bf /src/deployment.lisp | |
parent | 9cc2fd8af9b974c28534aaa40c736503bdef98d6 (diff) | |
download | consfigurator-8fa130526050c4d3bdfa5465e06180f813a71f3c.tar.gz |
rework bootloader installation so can use property-defining macros
It is better to have the code which installs bootloaders to volumes in
property definitions rather than in plain functions, as then we can specify
that it's :POSIX or :LISP, specify the OS required for it to run, and similar.
This commit enables that by replacing INSTALL-BOOTLOADER with a different
generic which returns propspecs.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/deployment.lisp')
-rw-r--r-- | src/deployment.lisp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/deployment.lisp b/src/deployment.lisp index 2ac6697..18c9ff0 100644 --- a/src/deployment.lisp +++ b/src/deployment.lisp @@ -53,6 +53,24 @@ preprocessed." (t (connect '((:local)))))))) +(defun consfigure (propspec-expression) + "Immediately preprocess and apply PROPSPEC-EXPRESSION in the context of the +current target host and connection. This function is provided for use by +specialised property combinators. It should not be used in property +definitions nor in consfigs. + +The :HOSTATTRS subroutines of properties applied by PROPSPEC-EXPRESSION will +be executed, but any new hostattrs they push will be discarded. Thus either +PROPSPEC-EXPRESSION should not apply any properties whose :HOSTATTRS +subroutines push new hostattrs, or the caller should seperately arrange for +those subroutines to be executed in a context in which newly pushed hostattrs +will not be discarded." + (%consfigure + nil (make-host + :hostattrs (hostattrs *host*) + :propspec (with-*host*-*consfig* + (make-propspec :propspec propspec-expression))))) + (defun deploy* (connections host &optional additional-properties) "Execute the deployment which is defined by the pair (CONNECTIONS . HOST), except possibly with the property application specification |