diff options
| author | Jeremy Katz <katzj@redhat.com> | 2008-12-21 19:51:39 -0500 |
|---|---|---|
| committer | Jeremy Katz <katzj@redhat.com> | 2009-01-06 11:19:24 -0500 |
| commit | ca01e8da3aecbfd7d521e0af117854f85b6db54d (patch) | |
| tree | d516fe0e259e6f2c6b9ed0e94cf79934f5d79421 /scripts | |
| parent | 6d6e4644da5fa21754e2797c26f5f4ad9cd50d11 (diff) | |
Die on errors from upd-instroot/mk-images rather than continuing on
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/buildinstall | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/buildinstall b/scripts/buildinstall index 97eaf6145..8167dccb6 100755 --- a/scripts/buildinstall +++ b/scripts/buildinstall @@ -18,6 +18,15 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # +die() { + [ -n "$TREEDIR" ] && rm -rf $TREEDIR + [ -n "$BUILDINSTDIR" ] && rm -rf $BUILDINSTDIR + [ -n "$yumconf" ] && rm -rf $yumconf + echo "Aborting buildinstall" + echo "$@" + exit 1 +} + usage() { echo "Usage: buildinstall --version <version> --product <product> --release <comment> [--output outputdir] [--discs <discstring>] <root>" >&2 exit 1 @@ -197,14 +206,14 @@ BUILDINSTALL=$BUILDINSTDIR/buildinstall if [ -n "$UPDATES" ]; then UPDATES="--updates $UPDATES"; fi echo "Building images..." -$UPD_INSTROOT $DEBUGSTR $NOGRSTR --arch $BUILDARCH $UPDATES --imgdir $TREEDIR/install $yumconf +$UPD_INSTROOT $DEBUGSTR $NOGRSTR --arch $BUILDARCH $UPDATES --imgdir $TREEDIR/install $yumconf || die "upd-instroot failed" echo "Writing .treeinfo file..." $MK_TREEINFO --family="$PRODUCTSTR" ${VARIANT:+--variant="$VARIANT"} --version=$VERSION --arch=$BUILDARCH --outfile=$OUTPUT/.treeinfo # FIXME: need to update mk-images to take the yumconf echo "Making images..." -$MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BUILDARCH --product "$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT $yumconf +$MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BUILDARCH --product "$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT $yumconf || die "image creation failed" echo "Writing .discinfo file" $MK_STAMP --releasestr="$RELEASESTR" --arch=$BUILDARCH --discNum="ALL" --outfile=$OUTPUT/.discinfo |
