[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] Generate valid treeinfo on i586
- From: Will Woods <wwoods redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH] Generate valid treeinfo on i586
- Date: Tue, 24 Feb 2009 16:38:17 -0500
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 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/scripts/buildinstall b/scripts/buildinstall
index 3c59a31..ab8d2df 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
--
1.6.0.6
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]