From 360dcc37df6b8d1b8613bc7a6675c69ec228e601 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Mon, 26 Jan 2009 23:11:51 +0200 Subject: [PATCH] Fix for FS#12944. --- setup | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/setup b/setup index fc7b2a9..172b0c1 100755 --- a/setup +++ b/setup @@ -659,15 +659,17 @@ select_mirror() { "Custom" "_" 2>$ANSWER || return 1 local _server=$(cat $ANSWER) if [ "${_server}" = "Custom" ]; then - DIALOG --inputbox "Enter the full URL to core repo." 8 65 \ - "ftp://ftp.archlinux.org/core/os/i686" 2>$ANSWER || return 1 + # sourcing /etc/makepkg.conf to get CARCH + [ -z "$CARCH" ] && source /etc/makepkg.conf + DIALOG --inputbox "Enter the full URL to the core repo (you may use \$repo as a placeholder for the repo name, i.e. core)." 8 65 \ + "ftp://ftp.archlinux.org/\$repo/os/$CARCH" 2>$ANSWER || return 1 SYNC_URL=$(cat $ANSWER) else # Form the full URL for our mirror by grepping for the server name in # our mirrorlist and pulling the full URL out. Substitute 'core' in # for the repository name, and ensure that if it was listed twice we # only return one line for the mirror. - SYNC_URL=$(egrep -o "${_server}.*" "${MIRRORLIST}" | sed 's/\$repo/core/g' | head -n1) + SYNC_URL=$(egrep -o "${_server}.*" "${MIRRORLIST}" | head -n1) fi echo "Using mirror: $SYNC_URL" >$LOG } @@ -691,7 +693,7 @@ CacheDir = ${DESTDIR}/var/cache/pacman/pkg CacheDir = /src/core/pkg [core] -Server = ${serverurl} +Server = ${serverurl//\$repo/core} EOF # Set up the necessary directories for pacman use -- 1.6.1.1