Remove vnet. Precursor to new kernel w/ iptables + vsever support.
[build.git] / mkfedora
index 63d0900..8821621 100755 (executable)
--- a/mkfedora
+++ b/mkfedora
@@ -13,7 +13,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2004-2006 The Trustees of Princeton University
 #
-# $Id: mkfedora,v 1.16 2006/07/06 22:55:47 mlhuang Exp $
+# $Id$
 #
 
 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
@@ -272,6 +271,7 @@ for optional in updates extras ; do
     for optionalurl in \
        $mirror/linux/core/$optional/$releasever/$basearch \
        $mirror/core/$optional/$releasever/$basearch \
+       $mirror/linux/$optional/$releasever/$basearch \
        $mirror/$optional/$releasever/$basearch ; do
         if fetch $optionalurl/repodata/repomd.xml ; then
            cat >>$vroot/etc/yum.conf <<EOF
@@ -293,14 +293,14 @@ if [ -n "$RPM_BUILD_DIR" ] ; then
     RPM_RPMS_DIR=$(cd $(dirname $RPM_BUILD_DIR)/RPMS && pwd -P)
     # yum-2.0.x
     if [ -x /usr/bin/yum-arch ] ; then
-       yum-arch $RPM_RPMS_DIR
+       yum-arch -q $RPM_RPMS_DIR
     fi
     # yum-2.4.x
     if [ -x /usr/bin/createrepo ] ; then
        if [ -f $RPM_RPMS_DIR/yumgroups.xml ] ; then
            groupfile="-g yumgroups.xml"
        fi
-       createrepo $groupfile $RPM_RPMS_DIR
+       createrepo --quiet $groupfile $RPM_RPMS_DIR
     fi
     # If run under sudo, allow user to delete the headers/ and
     # repodata/ directories.
@@ -327,15 +327,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[@]}"
+   if ! rpm --root $vroot -q "${packages[@]}" >/dev/null ; then
+       echo "* Warning: Missing packages"
+       rpm --root $vroot -q "${packages[@]}" | grep "not installed"
+   fi
 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