diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-07-02 14:37:54 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-07-10 19:39:56 -0700 |
commit | bf8e029d65eefd266c8c056662a83186cabb4a03 (patch) | |
tree | cf7613152a6b5a36278f7c2384063de6daacd711 /src/property | |
parent | 95b0a94667dec6df1c47f505dbc2980dcbe0f34c (diff) | |
download | consfigurator-bf8e029d65eefd266c8c056662a83186cabb4a03.tar.gz |
make OS:LINUX applicable to hosts & add to OS:SUPPORTS-ARCH-P
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property')
-rw-r--r-- | src/property/os.lisp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/property/os.lisp b/src/property/os.lisp index 553e60d..e9a9d8e 100644 --- a/src/property/os.lisp +++ b/src/property/os.lisp @@ -28,6 +28,12 @@ :documentation "Keyword whose name is Debian's name for this architecture, e.g. :AMD64"))) +(defprop linux :posix (architecture) + (:desc "Host kernel is Linux") + (:hostattrs (push-hostattrs :os (make-instance 'linux :arch architecture)))) + +(define-print-object-for-structlike linux) + (defclass debianlike (linux) ()) (defclass debian (debianlike) @@ -153,8 +159,10 @@ Used in property :HOSTATTRS subroutines." (defun supports-arch-p (os arch) "Can binaries of type ARCH run on OS?" - (cl:typecase os - (debian (or (eq (linux-architecture os) arch) - (member arch (assoc (linux-architecture os) - '((:amd64 :i386) - (:i386 :amd64)))))))) + (let ((same (eq (linux-architecture os) arch))) + (cl:typecase os + (debian (or same + (member arch (assoc (linux-architecture os) + '((:amd64 :i386) + (:i386 :amd64)))))) + (linux same)))) |