diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-23 14:15:55 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-23 14:35:13 -0700 |
commit | 98b29ed4ce015721a85f45b87e051809eaf546f8 (patch) | |
tree | 6128871ace493eb9d16ca8d1eb937fe0455df7ed /src/property/apt.lisp | |
parent | 2511ef04b3f5a2be6a87e46e4762aa33e1c8f937 (diff) | |
download | consfigurator-98b29ed4ce015721a85f45b87e051809eaf546f8.tar.gz |
rename APT:MIRROR to APT:MIRRORS, use &rest and rename the hostattr
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/apt.lisp')
-rw-r--r-- | src/property/apt.lisp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/property/apt.lisp b/src/property/apt.lisp index 22ff04b..7486d45 100644 --- a/src/property/apt.lisp +++ b/src/property/apt.lisp @@ -190,17 +190,14 @@ only upgrade Debian stable." (file:does-not-exist "/etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist") :unapply (removed "unattended-upgrades"))) -(defprop mirror :posix (uri) - (:desc #?"${uri} apt mirror selected") +(defprop mirrors :posix (&rest uris) + (:desc (format nil "apt mirror~P ~{~A~^, ~} selected" (length uris) uris)) (:hostattrs - (pushnew-hostattr :apt.mirror uri))) + (pushnew-hostattrs :apt.mirrors uris))) (defpropspec uses-parent-mirrors :posix () (:desc #?"Uses parent's apt mirror(s), if any") - (let ((mirrors (get-parent-hostattrs :apt-mirror))) - (and mirrors - `(eseqprops - ,@(loop for mirror in mirrors collect `(mirror ,mirror)))))) + (aand (get-parent-hostattrs :apt.mirrors) `(mirrors ,@it))) (defprop proxy :posix (uri) (:desc #?"${uri} apt proxy selected") @@ -221,7 +218,7 @@ only upgrade Debian stable." (proxy "http://[::1]:3142")) (defun get-mirrors () - (or (get-hostattrs :apt.mirror) + (or (get-hostattrs :apt.mirrors) (get-default-mirrors (get-hostattrs-car :os)))) (defmethod get-default-mirrors ((os os:debian)) |