From 585ac8fd4a618179fd7c2017b94a4d8e83a23540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Wed, 2 Mar 2016 10:50:05 +0100 Subject: [PATCH] chroot-run: fix getting Branch from pacman-mirrors.conf --- bin/chroot-run.in | 4 ++-- data/pacman-mirrors-stable.conf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/chroot-run.in b/bin/chroot-run.in index d650b94..ca669e2 100644 --- a/bin/chroot-run.in +++ b/bin/chroot-run.in @@ -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 diff --git a/data/pacman-mirrors-stable.conf b/data/pacman-mirrors-stable.conf index 6b66971..4a8d615 100644 --- a/data/pacman-mirrors-stable.conf +++ b/data/pacman-mirrors-stable.conf @@ -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 \ No newline at end of file +# NoUpdate = False