[PATCH] Generate valid treeinfo on i586

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

 



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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux