diff options
author | Jeremy Katz <katzj@redhat.com> | 2007-07-26 21:26:48 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2007-07-26 21:26:48 +0000 |
commit | 48d59c01cd5a90699640cb63911ec6afd92f35b8 (patch) | |
tree | bb2e0b23b4ecb8b6c71fe8e47d7efe13d5a643d2 /scripts | |
parent | 73c82f0b7355d286f956941af32461044bad1cb0 (diff) | |
download | anaconda-48d59c01cd5a90699640cb63911ec6afd92f35b8.tar.gz anaconda-48d59c01cd5a90699640cb63911ec6afd92f35b8.tar.xz anaconda-48d59c01cd5a90699640cb63911ec6afd92f35b8.zip |
2007-07-26 Jeremy Katz <katzj@redhat.com>
* scripts/upd-instroot: Use the tree as the repo rather than the
yum config on the machine (whoops!)
* scripts/buildinstall (BUILDINSTALL): Pass $p
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/buildinstall | 2 | ||||
-rwxr-xr-x | scripts/upd-instroot | 42 |
2 files changed, 37 insertions, 7 deletions
diff --git a/scripts/buildinstall b/scripts/buildinstall index a0e25a536..cada65247 100755 --- a/scripts/buildinstall +++ b/scripts/buildinstall @@ -134,7 +134,7 @@ MK_STAMP=$BUILDINSTDIR/makestamp.py BUILDINSTALL=$BUILDINSTDIR/buildinstall echo "Building images..." -$UPD_INSTROOT $DEBUGSTR $NOGRSTR $PKGDIR $TREEDIR/image-template $TREEDIR/instimage +$UPD_INSTROOT $DEBUGSTR $NOGRSTR $PKGDIR $TREEDIR/image-template $TREEDIR/instimage $p if [ -n "$PKGORDER" ]; then echo "Getting package order..." diff --git a/scripts/upd-instroot b/scripts/upd-instroot index d761dc774..6684004d1 100755 --- a/scripts/upd-instroot +++ b/scripts/upd-instroot @@ -147,13 +147,14 @@ instFile() { } expandPackageSet() { - RPMS=$1 - PKGDEST=$2 - KEEPFILES=$3 + YUMCONF=$1 + RPMS=$2 + PKGDEST=$3 + KEEPFILES=$4 [ -d $PKGDEST ] || die "ERROR: directory missing: $PKGDEST" mkdir $PKGDEST/yumdir - yum -y --installroot=$PKGDEST/yumdir install $RPMS + yum -c $YUMCONF -y --installroot=$PKGDEST/yumdir install $RPMS pushd $PKGDEST/yumdir >/dev/null cat $KEEPFILES | while read spec ; do @@ -190,6 +191,20 @@ else DESTGR=$3 fi +if [ -n "$4" ]; then + TOPDIR=$4 +elif [ -d $PACKAGEDIR/repodata ]; then + TOPDIR=$PACKAGEDIR +elif [ -d $PACKAGEDIR/../repodata ]; then + TOPDIR=$PACKAGEDIR/.. +elif [ -d $PACKAGEDIR/../../repodata ]; then + TOPDIR=$PACKAGEDIR/../.. +else + echo "Unable to find repodata!" + exit 1 +fi + + rm -rf $DEST $DESTGR mkdir -p $DEST mkdir -p $DESTGR @@ -1045,13 +1060,28 @@ for file in $KEEPFILE $KEEPFILEGR; do mv -f $file- $file done +yumconf=$(mktemp /tmp/yum.conf.XXXXXX) +cat > $yumconf <<EOF +[main] +keepcache=0 +gpgcheck=0 +plugins=0 + +[anacondarepo] +name=anaconda repo +baseurl=file://$TOPDIR +enabled=1 +EOF + echo "Expanding text packages..." -expandPackageSet "$RPMS" $DEST $KEEPFILE +expandPackageSet $yumconf "$RPMS" $DEST $KEEPFILE #(cd $DEST; tar cSpf - .) | (cd $DESTGR; tar xSpf -) echo "Expanding graphical packages..." -expandPackageSet "$RPMSGR" $DESTGR $KEEPFILEGR +expandPackageSet $yumconf "$RPMSGR" $DESTGR $KEEPFILEGR + +rm -f $yumconf # echo "retrieving timezones" # TZDIR=${TMPDIR:-/tmp}/glibc-timezone-$$ |