[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] Die on errors from upd-instroot/mk-images rather than continuing on
- From: Jeremy Katz <katzj redhat com>
- To: anaconda-devel-list redhat com
- Cc: Jeremy Katz <katzj redhat com>
- Subject: [PATCH] Die on errors from upd-instroot/mk-images rather than continuing on
- Date: Sun, 21 Dec 2008 19:51:39 -0500
---
scripts/buildinstall | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/scripts/buildinstall b/scripts/buildinstall
index 97eaf61..8167dcc 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
--
1.5.4.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]