aboutsummaryrefslogtreecommitdiff
path: root/src/property
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-04-23 14:15:55 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-04-23 14:35:13 -0700
commit98b29ed4ce015721a85f45b87e051809eaf546f8 (patch)
tree6128871ace493eb9d16ca8d1eb937fe0455df7ed /src/property
parent2511ef04b3f5a2be6a87e46e4762aa33e1c8f937 (diff)
downloadconsfigurator-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')
-rw-r--r--src/property/apt.lisp13
-rw-r--r--src/property/chroot.lisp4
-rw-r--r--src/property/sbuild.lisp2
3 files changed, 8 insertions, 11 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))
diff --git a/src/property/chroot.lisp b/src/property/chroot.lisp
index e894a9f..a61a9f5 100644
--- a/src/property/chroot.lisp
+++ b/src/property/chroot.lisp
@@ -30,12 +30,12 @@
(:apply
(destructuring-bind
(&key (apt.proxy (get-hostattrs-car :apt.proxy host))
- (apt.mirror (get-hostattrs-car :apt.mirror host))
+ (apt.mirror (get-hostattrs-car :apt.mirrors host))
&allow-other-keys
&aux (os (get-hostattrs-car :os host))
(args (list "debootstrap"
(plist-to-long-options
- (remove-from-plist options :apt.proxy :apt.mirror))
+ (remove-from-plist options :apt.proxy :apt.mirrors))
(strcat "--arch=" (os:debian-architecture os))
(os:debian-suite os)
root)))
diff --git a/src/property/sbuild.lisp b/src/property/sbuild.lisp
index a356d34..e0ce023 100644
--- a/src/property/sbuild.lisp
+++ b/src/property/sbuild.lisp
@@ -73,7 +73,7 @@ Example usage:
(os:debian-stable \"bullseye\" :amd64)
(apt:uses-local-cacher)
- (apt:mirror \"...\")
+ (apt:mirrors \"...\")
(sbuild:usable-by \"spwhitton\")
(schroot:overlays-in-tmpfs)
(periodic:at-most :monthly \"sbuild sid schroot rebuilt\"