From 79d529938a17cd06caa8862d5d758ee7d0e6c5e6 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Tue, 24 Feb 2009 16:38:17 -0500 Subject: Generate valid treeinfo on i586 BUILDARCH is now i586, but mk-images is internally mapping that to i386. If mk-images and maketreeinfo.py disagree about the arch, we end up with an invalid treeinfo file - the "arch" value won't match any images-$arch section. And then virt-install and other things can't find kernel images and stuff goes kaboom. Therefore: explicitly pass BASEARCH to mk-images, rather than relying on the implicit mapping therein, and pass the same value to maketreeinfo.py. --- scripts/buildinstall | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/buildinstall b/scripts/buildinstall index 3c59a3157..ab8d2df49 100755 --- a/scripts/buildinstall +++ b/scripts/buildinstall @@ -179,6 +179,9 @@ echo "Running buildinstall..." pushd $BUILDINSTDIR BUILDARCH=`repoquery -c $yumconf --qf "%{ARCH}\n" anaconda` +# This is a crappy implementation but x86 is the only place we currently see +# BUILDARCH != BASEARCH (e.g. i586 != i386) so it'll suffice. +BASEARCH=`echo $BUILDARCH | sed -e 's/i.86/i386/'` yumdownloader -c $yumconf anaconda || exit 1 rpm2cpio anaconda*rpm | cpio --quiet -iumd './usr*' rm -f anaconda*rpm @@ -212,11 +215,12 @@ echo "Building images..." $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 +# NOTE --arch must match MK_IMAGES or the resulting treeinfo will be invalid +$MK_TREEINFO --family="$PRODUCTSTR" ${VARIANT:+--variant="$VARIANT"} --version=$VERSION --arch=$BASEARCH --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 || die "image creation failed" +$MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BASEARCH --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 -- cgit