diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-01 23:38:57 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-01 23:38:57 -0700 |
commit | 8512a850bf9692052295e5242378011882d85976 (patch) | |
tree | b5c5c9649e5a62f99796d27156f771aed19c0cf8 | |
parent | f08df5cc392f16e5a702fbac4be0504842f30f00 (diff) | |
download | consfigurator-8512a850bf9692052295e5242378011882d85976.tar.gz |
OS:TYPECASE->OS:ETYPECASE & OS:HOST-TYPECASE->OS:HOST-ETYPECASE
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | src/connection/sbcl.lisp | 2 | ||||
-rw-r--r-- | src/package.lisp | 6 | ||||
-rw-r--r-- | src/property/chroot.lisp | 6 | ||||
-rw-r--r-- | src/property/os.lisp | 12 | ||||
-rw-r--r-- | src/property/service.lisp | 4 | ||||
-rw-r--r-- | src/property/sshd.lisp | 2 |
6 files changed, 16 insertions, 16 deletions
diff --git a/src/connection/sbcl.lisp b/src/connection/sbcl.lisp index 640854d..03554e3 100644 --- a/src/connection/sbcl.lisp +++ b/src/connection/sbcl.lisp @@ -21,7 +21,7 @@ (defproplist sbcl-available :posix () (:check (zerop (mrun :for-exit "command" "-v" "sbcl"))) - (os:typecase + (os:etypecase (debianlike (apt:installed "sbcl")))) (defmethod establish-connection ((type (eql :sbcl)) remaining &key) diff --git a/src/package.lisp b/src/package.lisp index 2a64cc3..24e4b2a 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -235,7 +235,7 @@ (defpackage :consfigurator.property.os (:use #:cl #:consfigurator) - (:shadow #:typecase) + (:shadow #:etypecase) (:export #:unixlike #:linux #:linux-architecture @@ -246,8 +246,8 @@ #:debian-unstable #:debian-suite #:debian-architecture - #:typecase - #:host-typecase + #:etypecase + #:host-etypecase #:required #:supports-arch-p)) diff --git a/src/property/chroot.lisp b/src/property/chroot.lisp index 79126bd..23ee3f1 100644 --- a/src/property/chroot.lisp +++ b/src/property/chroot.lisp @@ -44,9 +44,9 @@ (defpropspec %os-bootstrapper-installed :posix (host) (:desc (declare (ignore host)) "OS bootstrapper installed") - `(os:host-typecase ,host + `(os:host-etypecase ,host (debian - (os:typecase + (os:etypecase (debianlike (apt:installed "debootstrap")))))) (defpropspec %os-bootstrapped :posix (options root host) @@ -55,7 +55,7 @@ ;; for sending to remote Lisp images (:desc (declare (ignore options root host)) "OS bootstrapped") (let ((host host)) - `(os:host-typecase ,host + `(os:host-etypecase ,host (debian (%debootstrapped ,root ,host ,@options))))) (defproplist os-bootstrapped :lisp diff --git a/src/property/os.lisp b/src/property/os.lisp index f89534e..934dec8 100644 --- a/src/property/os.lisp +++ b/src/property/os.lisp @@ -83,7 +83,7 @@ ;;;; Property combinators -(define-function-property-combinator os-typecase* (host &rest cases) +(define-function-property-combinator os-etypecase* (host &rest cases) (flet ((choose-propapp () (or (loop with os = (class-of (if host (car (getf (hostattrs host) :os)) @@ -91,7 +91,7 @@ for (type propapp) on cases by #'cddr when (subtypep os type) return propapp) (inapplicable-property - "Host's OS ~S fell through OS:TYPECASE." + "Host's OS ~S fell through OS:ETYPECASE." (class-of (get-hostattrs-car :os)))))) (:retprop :type (collapse-types (loop for propapp in (cdr cases) by #'cddr collect (propapptype propapp))) @@ -108,11 +108,11 @@ (declare (ignore args)) (propappunapply (choose-propapp)))))) -(defmacro typecase (&body cases) - `(host-typecase nil ,@cases)) +(defmacro etypecase (&body cases) + `(host-etypecase nil ,@cases)) -(defmacro host-typecase (host &body cases) - `(os-typecase* +(defmacro host-etypecase (host &body cases) + `(os-etypecase* ,host ,@(loop for case in cases collect `',(intern (symbol-name (car case)) diff --git a/src/property/service.lisp b/src/property/service.lisp index 07ffabd..96f864e 100644 --- a/src/property/service.lisp +++ b/src/property/service.lisp @@ -45,8 +45,8 @@ configuration instead of editing /usr/sbin/policy-rc.d, this limitation should not affect you." (:desc #?"Starting services disabled") (%no-services) - (os:typecase - (debianlike (%policy-rc.d)))) + (os:etypecase + (debianlike (%policy-rc.d)))) (defprop running :posix (service) "Attempt to start service using service(1). diff --git a/src/property/sshd.lisp b/src/property/sshd.lisp index 78881a7..6e8cca2 100644 --- a/src/property/sshd.lisp +++ b/src/property/sshd.lisp @@ -21,7 +21,7 @@ (defproplist installed :posix () "Install an OpenSSH server." (:desc "OpenSSH server installed") - (os:typecase + (os:etypecase (debianlike (apt:installed "openssh-server")))) (defprop configured :posix (&rest pairs) |