summaryrefslogtreecommitdiffstats
path: root/scripts/buildinstall
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2008-06-12 11:15:25 -0400
committerChris Lumens <clumens@redhat.com>2008-06-13 11:38:36 -0400
commit12f1c07bb263f581333c699afe84a286dd155039 (patch)
tree29935b17066dacc1673e1049c03337aa7836d02c /scripts/buildinstall
parent93c9294f62782173f6d23843d5addcf2a476dfca (diff)
downloadanaconda-12f1c07bb263f581333c699afe84a286dd155039.tar.gz
anaconda-12f1c07bb263f581333c699afe84a286dd155039.tar.xz
anaconda-12f1c07bb263f581333c699afe84a286dd155039.zip
Add a mirrorlist option.
This option allows us to pass a mirrorlist into buildinstall instead of or in addition to baseurls. This will allow the yum object to make use of a list of potential mirrors should it have difficulties downloading something.
Diffstat (limited to 'scripts/buildinstall')
-rwxr-xr-xscripts/buildinstall17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/buildinstall b/scripts/buildinstall
index 4266d8301..829d33c24 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -67,6 +67,10 @@ while [ $# -gt 0 ]; do
UPDATES=$2
shift; shift
;;
+ --mirrorlist)
+ MIRRORLIST="$MIRRORLIST $2"
+ shift; shift
+ ;;
*)
if [ -z "$REPO" ]; then
@@ -142,6 +146,19 @@ EOF
let n++
done
+n=1
+for l in $MIRRORLIST; do
+ cat >> $yumconf <<EOF
+
+[anaconda-mirrorlistrepo-$n]
+name=anaconda mirrorlist repo $n
+mirrorlist=$l
+enabled=1
+EOF
+ let n++
+done
+
+
BUILDINSTDIR=`mktemp -d ${TMPDIR:-/tmp}/buildinstall.tree.XXXXXX`
TREEDIR=`mktemp -d ${TMPDIR:-/tmp}/treedir.XXXXXX`