diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-03-11 14:57:29 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-03-11 16:25:36 -0700 |
commit | f1cdc293b33b673de4813c71dc4a38337edff12e (patch) | |
tree | 94a43d6c26f5bbf299fa295d984d91839b397c18 | |
parent | f7aea946fad9ff801f9a7507a6afce000228507c (diff) | |
download | consfigurator-f1cdc293b33b673de4813c71dc4a38337edff12e.tar.gz |
replace uses of CALL-WITH-OS & drop the function
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | src/package.lisp | 1 | ||||
-rw-r--r-- | src/property.lisp | 3 | ||||
-rw-r--r-- | src/property/apt.lisp | 7 | ||||
-rw-r--r-- | src/property/chroot.lisp | 6 |
4 files changed, 7 insertions, 10 deletions
diff --git a/src/package.lisp b/src/package.lisp index aaf2989..9804f05 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -219,7 +219,6 @@ #:aborted-change #:assert-euid-root #:maybe-writefile-string - #:call-with-os #:with-change-if-changes-file #:with-change-if-changes-files #:with-change-if-changes-file-content diff --git a/src/property.lisp b/src/property.lisp index 7467ef6..a0e95c1 100644 --- a/src/property.lisp +++ b/src/property.lisp @@ -588,9 +588,6 @@ PATH already has the specified CONTENT and MODE." (apply #'writefile path content (and mode-supplied-p `(:mode ,mode))))) -(defun call-with-os (f &rest args) - (apply (ensure-function f) (get-hostattrs-car :os) args)) - (defun assert-euid-root () "Assert that the remote user has uid 0 (root)" (unless (zerop (get-connattr :remote-uid)) diff --git a/src/property/apt.lisp b/src/property/apt.lisp index 755ec7f..41ec98d 100644 --- a/src/property/apt.lisp +++ b/src/property/apt.lisp @@ -219,15 +219,16 @@ only upgrade Debian stable." (proxy "http://[::1]:3142")) (defun get-mirrors () - (or (get-hostattrs :apt.mirror) (call-with-os #'get-default-mirrors))) + (or (get-hostattrs :apt.mirror) + (get-default-mirrors (get-hostattrs-car :os)))) (defmethod get-default-mirrors ((os os:debian)) '("http://deb.debian.org/debian")) (defproplist standard-sources.list :posix () (:desc "Standard sources.list") - (file:has-content "/etc/apt/sources.list" - (call-with-os #'standard-sources-for))) + (file:has-content + "/etc/apt/sources.list" (standard-sources-for (get-hostattrs-car :os)))) (defmethod standard-sources-for ((os os:debian)) (let* ((suite (os:debian-suite os)) diff --git a/src/property/chroot.lisp b/src/property/chroot.lisp index 5b1c9b1..805f676 100644 --- a/src/property/chroot.lisp +++ b/src/property/chroot.lisp @@ -72,9 +72,9 @@ ;; %DEBOOTSTRAP-MANUALLY-INSTALLED for the case where the ;; architectures do not match because ensuring that debootstrap(8) ;; will be able to bootstrap a foreign arch is more involved. - ,@(and (not (call-with-os - #'os:supports-arch-p - (os:linux-architecture (get-hostattrs-car :os host)))) + ,@(and (not (os:supports-arch-p + (get-hostattrs-car :os) (os:linux-architecture + (get-hostattrs-car :os host)))) '((os:etypecase (debianlike (apt:installed "qemu-user-static"))))))))) |