diff options
author | Erich Eckner <git@eckner.net> | 2017-06-22 10:55:51 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-04-01 10:19:45 +0200 |
commit | e5788047491a1b52ff267251d5dfc4565c48832f (patch) | |
tree | d718486fd552356eeb5306cc47b807a715a0ae75 /arch-nspawn.in | |
parent | 721d84bc5d32335309cba98d0c3b8d7d27d7592c (diff) | |
download | devtools-e5788047491a1b52ff267251d5dfc4565c48832f.tar.xz |
separate mirrorlist for i686 and x86_64
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r-- | arch-nspawn.in | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in index e68e2e7..1d2b845 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -58,10 +58,15 @@ else cache_dirs=("$cache_dir") fi +if [[ -n $makepkg_conf ]]; then + eval "$(grep -a '^CARCH=' "$makepkg_conf")" +else + eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")" +fi + pacconf_cmd=$(command -v pacman-conf || command -v pacconf) # shellcheck disable=2016 -host_mirrors=($($pacconf_cmd --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')) -# shellcheck disable=2016 +host_mirrors=($($pacconf_cmd --conf=$pac_conf --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')) # {{{ functions build_mount_args() { @@ -83,7 +88,9 @@ build_mount_args() { copy_hostconf () { cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d" - printf 'Server = %s\n' "${host_mirrors[@]}" >"$working_dir/etc/pacman.d/mirrorlist" + printf 'Server = %s\n' "${host_mirrors[@]}" | \ + tee "$working_dir/etc/pacman.d/mirrorlist" > \ + "$working_dir/etc/pacman.d/mirrorlist32" [[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf" [[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf" @@ -110,8 +117,6 @@ fi build_mount_args copy_hostconf -eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")" - [[ -z $nosetarch ]] || unset CARCH exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \ |