summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2009-02-24 16:38:17 -0500
committerChris Lumens <clumens@redhat.com>2009-02-25 17:32:26 -0500
commit79d529938a17cd06caa8862d5d758ee7d0e6c5e6 (patch)
tree5e7ebf8778a556c2e78cff89bdb0259a6f9540fe /scripts
parent727d429eae6e8db82106257c71084017e894fb90 (diff)
downloadanaconda-79d529938a17cd06caa8862d5d758ee7d0e6c5e6.tar.gz
anaconda-79d529938a17cd06caa8862d5d758ee7d0e6c5e6.tar.xz
anaconda-79d529938a17cd06caa8862d5d758ee7d0e6c5e6.zip
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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/buildinstall8
1 files changed, 6 insertions, 2 deletions
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