Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch-nspawn.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in
index 5817143..90fe967 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -99,7 +99,14 @@ build_mount_args() {
copy_hostconf () {
unshare --fork --pid gpg --homedir "$working_dir"/etc/pacman.d/gnupg/ --no-permission-warning --quiet --batch --import --import-options import-local-sigs "$(pacman-conf GpgDir)"/pubring.gpg >/dev/null 2>&1
pacman-key --gpgdir "$working_dir"/etc/pacman.d/gnupg/ --import-trustdb "$(pacman-conf GpgDir)" >/dev/null 2>&1
+
printf 'Server = %s\n' "${host_mirrors[@]}" >"$working_dir/etc/pacman.d/mirrorlist"
+ for host_mirror in "${host_mirrors[@]}"; do
+ if [[ $host_mirror == *file://* ]]; then
+ host_mirror=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
+ in_array "$host_mirror" "${cache_dirs[@]}" || cache_dirs+=("$host_mirror")
+ fi
+ done
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
[[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"