From: Thierry Parmentelat Date: Fri, 11 Aug 2006 12:23:57 +0000 (+0000) Subject: * Default set of mirrors matches myplc's user doc X-Git-Tag: planetlab-4_0-rc1~65 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d96be6efd8e8129aba79348dc7a55ff4c814604b;p=build.git * Default set of mirrors matches myplc's user doc * yum install by package : checks for actual installation of packages * yum install by group : performed sequentially for detailed feedback on dependencies in the build log --- diff --git a/mkfedora b/mkfedora index 63d0900b..7283f3d9 100755 --- a/mkfedora +++ b/mkfedora @@ -13,7 +13,7 @@ # Mark Huang # Copyright (C) 2004-2006 The Trustees of Princeton University # -# $Id: mkfedora,v 1.16 2006/07/06 22:55:47 mlhuang Exp $ +# $Id: mkfedora,v 1.17 2006/07/17 21:25:42 mlhuang Exp $ # export PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -23,12 +23,11 @@ verbose=0 # Default yum repositories to try mirrors=( -file:///usr/share/mirrors/fedora -file:///var/www/html/mirrors/fedora -ftp://smoke.cs.princeton.edu/pub/mirrors/fedora -ftp://128.112.137.30/pub/mirrors/fedora +file:///data/fedora http://coblitz.planet-lab.org/pub/fedora ftp://mirror.cs.princeton.edu/pub/mirrors/fedora +ftp://mirror.stanford.edu/pub/mirrors/fedora +ftp://rpmfind.net/linux/fedora ) # Release and architecture to install @@ -201,6 +200,12 @@ mount -t tmpfs none $vroot/dev/shm mkdir -p $vroot/proc mount -t proc none $vroot/proc +bailout () +{ + cleanup + exit $1 +} + cleanup () { umount $vroot/proc @@ -327,15 +332,22 @@ yum -c $vroot/etc/yum.conf --installroot=$vroot -y $excludes install glibc # Go, baby, go if [ ${#packages[*]} -gt 0 ] ; then - echo "* Installing optional packages" >&3 - yum -c $vroot/etc/yum.conf --installroot=$vroot -y $excludes \ - install "${packages[@]}" + echo "* Installing optional packages" "${packages[@]}" >&3 + yum -c $vroot/etc/yum.conf --installroot=$vroot -y $excludes \ + install "${packages[@]}" + for pkg in "${packages[@]}" ; do + echo "Checking installation of $pkg" + rpm --root $vroot -q "$pkg" || bailout 1 + done fi if [ ${#groups[*]} -gt 0 ] ; then - echo "* Installing optional groups" >&3 - yum -c $vroot/etc/yum.conf --installroot=$vroot -y $excludes \ - groupinstall "${groups[@]}" + ## call yum sequentially to get finer-grained info on dependencies + for grp in "${groups[@]}" ; do + echo "* Installing optional group $grp" >&3 + yum -c $vroot/etc/yum.conf --installroot=$vroot -y $excludes \ + groupinstall "$grp" + done fi # FC2 dev %preinstall checks /proc/mounts to make sure that /dev is