summaryrefslogtreecommitdiffstats
path: root/scripts/buildinstall
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-04-28 20:26:22 +0000
committerJeremy Katz <katzj@redhat.com>2003-04-28 20:26:22 +0000
commit04e1c5eeca1ac9b0165faa6267157c0e45eafa33 (patch)
tree0b326a1b79f52a97ad6aa4e1de80e595f4b47903 /scripts/buildinstall
parent1844974b26cef1ebedbe2b9cdff3961ed8e4d8ca (diff)
downloadanaconda-04e1c5eeca1ac9b0165faa6267157c0e45eafa33.tar.gz
anaconda-04e1c5eeca1ac9b0165faa6267157c0e45eafa33.tar.xz
anaconda-04e1c5eeca1ac9b0165faa6267157c0e45eafa33.zip
move most of the work and storage for building trees to /tmp on
build machines -- gives a pretty good speedup
Diffstat (limited to 'scripts/buildinstall')
-rwxr-xr-xscripts/buildinstall26
1 files changed, 18 insertions, 8 deletions
diff --git a/scripts/buildinstall b/scripts/buildinstall
index e323597cb..7205c616c 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -55,9 +55,10 @@ if [ -z "$RELEASESTR" ]; then
usage
fi
-p=`cd $DIR; /bin/pwd | sed 's,/md1/,/,g'`
+p=`cd $DIR; /bin/pwd`
BUILDINSTDIR=$p/buildinstall.tree.$$
+TREEDIR=/tmp/treedir.$$
rm -rf $BUILDINSTDIR
mkdir -p $BUILDINSTDIR
@@ -88,27 +89,32 @@ fi
MK_IMAGES=$BUILDINSTDIR/mk-images
echo "Building images..."
-$UPD_INSTROOT --comp $COMPNAME $p/RedHat/RPMS $p/image-template $p/RedHat/instimage
+if [ -x /usr/bin/runroot ]; then
+ runroot $COMPNAME --onlyone --arch $BUILDARCH "$UPD_INSTROOT --comp $COMPNAME $p/RedHat/RPMS $TREEDIR/image-template $TREEDIR/instimage"
+else
+ $UPD_INSTROOT --comp $COMPNAME $p/RedHat/RPMS $TREEDIR/image-template $TREEDIR/instimage
+fi
# XXX hack - msw
if [ $BUILDARCH = "sparc" ]; then
BUILDARCH=sparc64
fi
-if [ -n "$PKGORDER" -a -x $p/RedHat/instimage/usr/lib/anaconda-runtime/pkgorder ]; then
+if [ -n "$PKGORDER" -a -x $TREEDIR/instimage/usr/lib/anaconda-runtime/pkgorder ]; then
echo "Getting package order..."
if [ -x /usr/bin/runroot ]; then
- runroot --quiet $COMPNAME --onlyone --arch $BUILDARCH \
+ runroot $COMPNAME --onlyone --arch $BUILDARCH \
"PYTHONPATH=$p/RedHat/instimage/usr/lib/anaconda $p/RedHat/instimage/usr/lib/anaconda-runtime/pkgorder $p $BUILDARCH" > $PKGORDER
else
- PYTHONPATH=$p/RedHat/instimage/usr/lib/anaconda $p/RedHat/instimage/usr/lib/anaconda-runtime/pkgorder $p $BUILDARCH > $PKGORDER
+ PYTHONPATH=$TREEDIR/instimage/usr/lib/anaconda $TREEDIR/instimage/usr/lib/anaconda-runtime/pkgorder $p $BUILDARCH > $PKGORDER
fi
fi
+echo "Making images..."
if [ -x /usr/bin/runroot ]; then
- runroot $COMPNAME --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $p/RedHat/RPMS $p $p/image-template $BUILDARCH '\"$PRODUCTSTR\"' $VERSION"
+ runroot $COMPNAME --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $p/RedHat/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH '\"$PRODUCTSTR\"' $VERSION"
else
- $MK_IMAGES $p/RedHat/RPMS $p $p/image-template $BUILDARCH "$PRODUCTSTR" $VERSION
+ $MK_IMAGES $p/RedHat/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH "$PRODUCTSTR" $VERSION
fi
MK_STAMP=./makestamp.py
@@ -126,4 +132,8 @@ MK_STAMP=$BUILDINSTDIR/makestamp.py
$MK_STAMP --releasestr="$RELEASESTR" --arch=$BUILDARCH --discNum="1,2,3" --baseDir=RedHat/base --packagesDir=RedHat/RPMS --pixmapsDir=RedHat/pixmaps --outfile=$p/.discinfo
rm -rf $BUILDINSTDIR
-rm -rf $p/image-template $p/RedHat/instimage
+if [ -x /usr/bin/runroot ]; then
+ runroot $COMPNAME --onlyone --arch $BUILDARCH "rm -rf $TREEDIR/image-template $TREEDIR/instimage"
+else
+ rm -rf $TREEDIR/image-template $TREEDIR/instimage
+fi