# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004-2006 The Trustees of Princeton University
#
-# $Id$
+# $Id: system-packages.sh,v 1.2 2006/04/10 22:21:48 mlhuang Exp $
#
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
fi
}
-# pl_netflow requires third party MySQL RPMs
-mysql_mirrors=(
-file:///usr/share/mirrors/mysql
-http://boot.planet-lab.org/install-rpms/3rdparty
-)
-
-for mirror in "${mysql_mirrors[@]}" ; do
- baseurl=$mirror/
- if list $baseurl | grep -q "MySQL-server.*rpm" ; then
- break
- fi
- unset baseurl
-done
-
-if [ -z "$baseurl" ] ; then
- echo "Error: MySQL-server RPM package"
- echo " could not be found in any of the following locations:"
- echo
- for mirror in ${mysql_mirrors[@]} ; do
- echo $mirror
- done
- echo
- exit 1
-fi
-
-# Add MySQL mirror to yum.conf
-if ! grep -q mysql $vroot/etc/yum.conf ; then
- cat >>$vroot/etc/yum.conf <<EOF
-
-[mysql]
-name=MySQL
-baseurl=$baseurl
-EOF
-fi
-
# Space separated list of required packages
pl_netflow="netflow"
pl_conf="sidewinder-PlanetLab-SCS sidewinder-common"
version=${version##*:}
repository=${words[3]}
- if [ -f $rpms/$package-$version.$arch.rpm ] ; then
- break
- fi
-
baseurl=
while read line ; do
- if grep -q "^\[$repository\]" <<<$line ; then
+ if [ -z "$line" ] ; then
+ continue
+ elif grep -q "^\[$repository\]" <<<$line ; then
baseurl=$repository
elif [ "$baseurl" = "$repository" ] && grep -q "^baseurl=" <<<$line ; then
eval $line
break
fi
done <$vroot/etc/yum.conf
- done < <(yum -c $vroot/etc/yum.conf --installroot=$vroot shell <<EOF
+ done < <((yum -c $vroot/etc/yum.conf --installroot=$vroot shell <<EOF
install $packages
transaction solve
transaction list
EOF
+ ) | sed -ne '/^Installing:/,/^Transaction Summary/p'
)
else
# This is pretty fucked up. Turn on verbose debugging and the