diff options
Diffstat (limited to 'scripts/buildinstall')
-rwxr-xr-x | scripts/buildinstall | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/scripts/buildinstall b/scripts/buildinstall index e323597cb..2dbf60a34 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" ]; then echo "Getting package order..." if [ -x /usr/bin/runroot ]; then runroot --quiet $COMPNAME --onlyone --arch $BUILDARCH \ - "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 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 |