# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004-2006 The Trustees of Princeton University
#
-# $Id: mkfedora,v 1.18 2006/08/11 12:23:57 thierry Exp $
+# $Id$
#
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
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
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.
echo "* Installing optional packages" "${packages[@]}" >&3
yum -c $vroot/etc/yum.conf --installroot=$vroot -y $excludes \
install "${packages[@]}"
- missing=$(rpm --root $vroot -q "${packages[@]}" | grep "not installed")
- if [ -n "$missing" ] ; then
+ if ! rpm --root $vroot -q "${packages[@]}" >/dev/null ; then
echo "* Warning: Missing packages"
- cat <<<$missing
+ rpm --root $vroot -q "${packages[@]}" | grep "not installed"
fi
fi