Feature Request #623 ยป mirrorlist-hack.patch
/usr/lib/libretools/chroot/arch-nspawn 2014-12-18 15:00:20.616666668 -0300 | ||
---|---|---|
53 | 53 |
cache_dirs=("$cache_dir") |
54 | 54 |
fi |
55 | 55 | |
56 |
mirrorlist_path="/etc/libretools/mirrorlist" |
|
57 | ||
56 | 58 |
host_mirror=$(pacman -Sddp extra/devtools 2>/dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#') |
57 | 59 |
[[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g') |
58 | 60 | |
... | ... | |
73 | 75 | |
74 | 76 |
copy_hostconf () { |
75 | 77 |
cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d" |
76 |
echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist" |
|
78 |
echo "arch-nspawn: Copying mirrorlist from the host to the chroot" |
|
79 |
cp -v "$mirrorlist_path" "$working_dir"/etc/pacman.d/mirrorlist |
|
77 | 80 | |
78 | 81 |
[[ -n $pac_conf ]] && cp $pac_conf "$working_dir/etc/pacman.conf" |
79 | 82 |
[[ -n $makepkg_conf ]] && cp $makepkg_conf "$working_dir/etc/makepkg.conf" |
/usr/lib/libretools/chroot/mkarchroot | ||
---|---|---|
80 | 80 |
echo 'LANG=C' > "$working_dir/etc/locale.conf" |
81 | 81 |
echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot" |
82 | 82 | |
83 |
mirrorlist_hack() { |
|
84 |
msg "Copying mirrorlist file from the host path \ |
|
85 |
/etc/libretools/mirrorlist to $arch root chroot path /etc/libretools/" |
|
86 |
sudo mkdir -v "$working_dir/etc/libretools/" |
|
87 |
sudo cp -v /etc/libretools/mirrorlist "$working_dir/etc/libretools/" |
|
88 |
} |
|
89 | ||
90 |
mirrorlist_hack |
|
91 | ||
83 | 92 |
exec "$(librelib chroot/arch-nspawn)" \ |
84 | 93 |
${pac_conf:+-C "$pac_conf"} \ |
85 | 94 |
${makepkg_conf:+-M "$makepkg_conf"} \ |