summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-01 20:26:48 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-01 20:26:48 +0100
commitac721259361f73dfc5bf710838514c8701fb6357 (patch)
tree282fc7464cb2e83ea4e2e696576b04107a2968a6 /src
parent40b3096d3cc077d2ead92f9fbd0836d8e837e755 (diff)
fixes related to pacman preparation, source urls etc
Diffstat (limited to 'src')
-rw-r--r--src/lib/lib-pacman.sh12
-rw-r--r--src/profiles/profile-base1
2 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/lib-pacman.sh b/src/lib/lib-pacman.sh
index 40c7980..4f64794 100644
--- a/src/lib/lib-pacman.sh
+++ b/src/lib/lib-pacman.sh
@@ -59,8 +59,8 @@ target_write_pacman_conf ()
# params: none
# returns: 1 on error
target_prepare_pacman() {
- [ "$var_PKG_SOURCE_TYPE" = "cd" ] && local serverurl="${FILE_URL}"
- [ "$var_PKG_SOURCE_TYPE" = "ftp" ] && local serverurl="${SYNC_URL}"
+ [ "$var_PKG_SOURCE_TYPE" = "cd" ] && local serverurl="${var_FILE_URL}"
+ [ "$var_PKG_SOURCE_TYPE" = "ftp" ] && local serverurl="${var_SYNC_URL}"
# Setup a pacman.conf in /tmp
cat << EOF > /tmp/pacman.conf
@@ -99,7 +99,7 @@ pacman_what_is_this_for ()
# select_mirror(). taken from setup. TODO: get the UI code out of here
-# Prompt user for preferred mirror and set $SYNC_URL
+# Prompt user for preferred mirror and set $var_SYNC_URL
#
# args: none
# returns: nothing
@@ -114,15 +114,15 @@ select_mirror() {
if [ "${_server}" = "Custom" ]; then
_dia_DIALOG --inputbox "Enter the full URL to core repo." 8 65 \
"ftp://ftp.archlinux.org/core/os/i686" 2>$ANSWER || return 1
- SYNC_URL=$(cat $ANSWER)
+ var_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)
+ var_SYNC_URL=$(egrep -o "${_server}.*" "${MIRRORLIST}" | sed 's/\$repo/core/g' | head -n1)
fi
- echo "Using mirror: $SYNC_URL" >$LOG
+ echo "Using mirror: $var_SYNC_URL" >$LOG
}
# select_source(). taken from setup. TODO: decouple ui
diff --git a/src/profiles/profile-base b/src/profiles/profile-base
index aa71d35..ab41540 100644
--- a/src/profiles/profile-base
+++ b/src/profiles/profile-base
@@ -65,6 +65,7 @@ worker_package_list ()
worker_install_packages ()
{
target_special_fs on
+ target_prepare_pacman
[ ! -f $var_PKG_FILE ] && die_error "No package file available!"
PKGLIST=`cat $var_PKG_FILE`
#TODO: what if $var_PKG_FILE is empty? we should die_error because that's probably not what the user wants.. or can it? will pacman complain?