chroot-run: fix getting Branch from pacman-mirrors.conf

This commit is contained in:
Ramon Buldó 2016-03-02 10:50:05 +01:00 committed by Philip
parent 4235a98bbf
commit 585ac8fd4a
2 changed files with 4 additions and 4 deletions

View file

@ -83,13 +83,13 @@ copy_hostconf () {
if [[ -n ${build_mirror} ]];then
build_mirror=${build_mirror}'/$repo/$arch'
if ${keep_mirrors}; then
source $1/etc/pacman-mirrors.conf
Branch=$(cat "$1/etc/pacman-mirrors.conf" | grep '^Branch = ' | sed 's/Branch = \s*//g')
sed -e "s|/stable|/${Branch}|g" -i "$1/etc/pacman.d/mirrorlist"
else
echo "Server = ${build_mirror}" > "$1/etc/pacman.d/mirrorlist"
fi
else
source $1/etc/pacman-mirrors.conf
Branch=$(cat "$1/etc/pacman-mirrors.conf" | grep '^Branch = ' | sed 's/Branch = \s*//g')
sed -e "s|/stable|/${Branch}|g" -i "$1/etc/pacman.d/mirrorlist"
fi

View file

@ -3,7 +3,7 @@
##
## Branch Pacman should use (stable, testing, unstable)
# Branch = stable
Branch = stable
## Generation method
## 1) rank - rank mirrors depending on their access time
@ -25,4 +25,4 @@
## pacman-mirrors is invoked with the --no-update argument.
## Useful if you don't want the mirrorlist regenerated after a
## pacman-mirrors package upgrade.
# NoUpdate = False
# NoUpdate = False