diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-06-07 17:12:47 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-06-07 17:12:47 -0700 |
commit | 9d8548b589f9b6496f9fb7c0dcc1446a91ca5e86 (patch) | |
tree | 3072f1dd3e99b3cdb26430e9fd299a93b955c5db /src/property/chroot.lisp | |
parent | d8cf69998f80292f51ac02e7fa98e442224690d3 (diff) | |
download | consfigurator-9d8548b589f9b6496f9fb7c0dcc1446a91ca5e86.tar.gz |
CHROOT::%DEBOOTSTRAPPED: improve choosing the apt proxy and mirror
- Look at the chroot host's hostattrs, not the parent host, as perhaps the
parent's apt mirror does not carry the chroot host's suite, &c.
- Allow overriding this using the chroot bootstrapper options.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/chroot.lisp')
-rw-r--r-- | src/property/chroot.lisp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/property/chroot.lisp b/src/property/chroot.lisp index e92bed8..ee11cbd 100644 --- a/src/property/chroot.lisp +++ b/src/property/chroot.lisp @@ -28,16 +28,22 @@ (progn (delete-remote-trees root) nil) (remote-exists-p (merge-pathnames "usr/lib/os-release" root)))) (:apply - (let* ((os (get-hostattrs-car :os host)) + (destructuring-bind + (&key (apt.proxy (get-hostattrs-car :apt.proxy host)) + (apt.mirror (get-hostattrs-car :apt.mirror host)) + &allow-other-keys + &aux (os (get-hostattrs-car :os host)) (args (list "debootstrap" - (plist-to-cmd-args options) + (plist-to-cmd-args + (remove-from-plist options :apt.proxy :apt.mirror)) (strcat "--arch=" (os:debian-architecture os)) (os:debian-suite os) root))) - (when-let ((proxy (get-hostattrs-car :apt.proxy))) - (setq args (list* :env (list :http_proxy proxy) args))) - (when-let ((mirror (get-hostattrs-car :apt.mirror))) - (nconcf args (list mirror))) + options + (when apt.proxy + (setq args (list* :env (list :http_proxy apt.proxy) args))) + (when apt.mirror + (nconcf args (list apt.mirror))) (apply #'run args)))) (defpropspec %os-bootstrapper-installed :posix (host) |