--- /usr/lib/libretools/chroot/arch-nspawn 2014-12-18 15:02:04.343333329 -0300 +++ /usr/lib/libretools/chroot/arch-nspawn 2014-12-18 15:00:20.616666668 -0300 @@ -53,6 +53,8 @@ cache_dirs=("$cache_dir") fi +mirrorlist_path="/etc/libretools/mirrorlist" + host_mirror=$(pacman -Sddp extra/devtools 2>/dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#') [[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g') @@ -73,7 +75,8 @@ copy_hostconf () { cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d" - echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist" + echo "arch-nspawn: Copying mirrorlist from the host to the chroot" + cp -v "$mirrorlist_path" "$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" diff --git a/usr/lib/libretools/chroot/mkarchroot b/usr/lib/libretools/chroot/mkarchroot old mode 100755 new mode 100755 index afac971..ac3fe87 --- /usr/lib/libretools/chroot/mkarchroot +++ /usr/lib/libretools/chroot/mkarchroot @@ -80,6 +80,15 @@ printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen" echo 'LANG=C' > "$working_dir/etc/locale.conf" echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot" +mirrorlist_hack() { + msg "Copying mirrorlist file from the host path \ +/etc/libretools/mirrorlist to $arch root chroot path /etc/libretools/" + sudo mkdir -v "$working_dir/etc/libretools/" + sudo cp -v /etc/libretools/mirrorlist "$working_dir/etc/libretools/" +} + +mirrorlist_hack + exec "$(librelib chroot/arch-nspawn)" \ ${pac_conf:+-C "$pac_conf"} \ ${makepkg_conf:+-M "$makepkg_conf"} \