From: Aaron Klingaman Date: Fri, 1 Apr 2005 19:18:00 +0000 (+0000) Subject: add a nice little hack to make sure that yum installs all the rpms X-Git-Tag: BOOTCD_V_3_0_FINAL~18 X-Git-Url: http://git.onelab.eu/?p=bootcd.git;a=commitdiff_plain;h=a8d579eef01f8e2b272c5c77ffbe287820d0d0e8 add a nice little hack to make sure that yum installs all the rpms in the bootcd group, so the script will fail if anything is missing --- diff --git a/build.sh b/build.sh index 6a94392..09fac14 100755 --- a/build.sh +++ b/build.sh @@ -68,6 +68,20 @@ function build_cdroot() echo "install boot cd base rpms" yum -c yum.conf --installroot=$CD_ROOT -y groupinstall $BOOTCD_YUM_GROUP + echo "checking to make sure rpms were installed" + packages=`cat yumgroups.xml | grep packagereq | sed 's#<[^<]*>##g'` + set +e + for package in $packages; do + echo "checking for package $package" + chroot $CD_ROOT /bin/rpm -qi $package > /dev/null + if [[ "$?" -ne 0 ]]; then + echo "package $package was not installed in the cd root." + echo "make sure it exists in the yum repository." + exit 1 + fi + done + set -e + echo "removing unneccessary build files" (cd $CD_ROOT/lib/modules && \ find ./ -type d -name build -maxdepth 2 -exec rm -rf {} \;)