[PATCH 2/2] Move the ppc64 image size check

David Shea dshea at redhat.com
Wed Oct 2 16:08:00 UTC 2013


This moves the ppc64.img size check to after the image has been
generated.

Resolves: rhbz#1014719
---
 scripts/mk-images.ppc | 39 +++++++++++++++++++--------------------
 1 file changed, 19 insertions(+), 20 deletions(-)

diff --git a/scripts/mk-images.ppc b/scripts/mk-images.ppc
index 81b8859..2be2e73 100644
--- a/scripts/mk-images.ppc
+++ b/scripts/mk-images.ppc
@@ -31,25 +31,6 @@ makeBootImages() {
             --loaderbin loader \
             --modules "$INITRDMODS spufs viocd gpio_mdio"
 
-        ramdiskOversized=$(($(stat --format=%s $TOPDESTPATH/ppc/ppc64/$RAMDISK) > 32*1024*1024))
-        netbootOversized=$(($(stat --format=%s $TOPDESTPATH/images/netboot/ppc64.img) > 32*1024*1024))
-
-        if [ $ramdiskOversized -o $netbootOversized ]; then
-            echo "***"
-            [ $ramdiskOversized ] && echo "*** PPC64 ppc/ppc64/$RAMDISK is larger than 32 MB, aborting"
-            [ $netbootOversized ] && echo "*** PPC64 images/netboot/ppc64.img is larger than 32 MB, aborting"
-            echo "***"
-            echo "*** This file is generated by scripts/mk-images.ppc in anaconda, but the most"
-            echo "*** likely causes of this problem are:"
-            echo "***     kernel module set on ppc64 grew in size"
-            echo "***     dependent libraries or programs grew in size"
-            echo "***"
-            echo "*** Please contact the anaconda development team for help determining which"
-            echo "*** component in the distribution is at fault."
-            echo "***"
-            exit 1
-        fi
-
         cp $KERNELROOT/boot/vmlinuz-* $TOPDESTPATH/ppc/ppc64/vmlinuz
         sed -e "s/%BITS%/64/" -e "s/%PRODUCT%/$PRODUCT/" -e "s/%VERSION%/$VERSION/" \
             $BOOTDISKDIR/yaboot.conf.in > $TOPDESTPATH/ppc/ppc64/yaboot.conf
@@ -84,8 +65,26 @@ __EOT__
                 fi
         fi
 
-        echo >> $TOPDESTPATH/.treeinfo
+        ramdiskOversized=$(($(stat --format=%s $TOPDESTPATH/ppc/ppc64/$RAMDISK) > 32*1024*1024))
+        netbootOversized=$(($(stat --format=%s $TOPDESTPATH/images/netboot/ppc64.img) > 32*1024*1024))
 
+        if [ $ramdiskOversized -o $netbootOversized ]; then
+            echo "***"
+            [ $ramdiskOversized ] && echo "*** PPC64 ppc/ppc64/$RAMDISK is larger than 32 MB, aborting"
+            [ $netbootOversized ] && echo "*** PPC64 images/netboot/ppc64.img is larger than 32 MB, aborting"
+            echo "***"
+            echo "*** This file is generated by scripts/mk-images.ppc in anaconda, but the most"
+            echo "*** likely causes of this problem are:"
+            echo "***     kernel module set on ppc64 grew in size"
+            echo "***     dependent libraries or programs grew in size"
+            echo "***"
+            echo "*** Please contact the anaconda development team for help determining which"
+            echo "*** component in the distribution is at fault."
+            echo "***"
+            exit 1
+        fi
+
+        echo >> $TOPDESTPATH/.treeinfo
 
     elif [ "$KERNELARCH" = "ppc" ]; then
         FAKEARCH="ppc"
-- 
1.8.3.1



More information about the anaconda-patches mailing list