[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] catch errors from yum, exit on them



When building the root for the second stage, we should a) catch stderr so we see
yum errors in the log b) exit on those errors, as it's unlikely the images will
be any good if we can't install the package set.

Bill
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index dcd7db9..1aad290 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -163,7 +163,7 @@ expandPackageSet() {
     KEEPFILES=$5
 
     [ -d $PKGDEST ] || die "ERROR: directory missing: $PKGDEST"
-    yum -c $YUMCONF -y --installroot=$YUMDIR install $RPMS
+    yum -c $YUMCONF -y --installroot=$YUMDIR install $RPMS 2>&1 || die "ERROR: could not install packages"
 
     # figure out the theme to keep
     if [ -f $YUMDIR/etc/gtk-2.0/gtkrc ]; then

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]