Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/arch-nspawn.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch-nspawn.in')
-rw-r--r--src/arch-nspawn.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/arch-nspawn.in b/src/arch-nspawn.in
index 2318813..a4504a1 100644
--- a/src/arch-nspawn.in
+++ b/src/arch-nspawn.in
@@ -72,6 +72,7 @@ fi
# shellcheck disable=2016
host_mirrors=($(pacman-conf --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
+host_cachemirrors=($(pacman-conf --repo extra CacheServer 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
for host_mirror in "${host_mirrors[@]}"; do
if [[ $host_mirror == *file://* ]]; then
@@ -106,6 +107,8 @@ copy_hostconf () {
printf 'Server = %s\n' "${host_mirrors[@]}" >"$working_dir/etc/pacman.d/mirrorlist"
+ [[ -n $host_cachemirrors ]] && printf 'CacheServer = %s\n' "${host_cachemirrors[@]}" >>"$working_dir/etc/pacman.d/mirrorlist"
+
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
[[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"