bootstrap: install requirements before removing conflicts

Change-Id: I239601417f9b7b5fb50bad05a0ee2ee279e6596b
This commit is contained in:
Alessio Ababilov 2013-06-25 13:50:32 +03:00
parent fcd9690ef4
commit 78185e215b

23
smithy
View File

@ -116,6 +116,19 @@ bootstrap_epel()
bootstrap_rpm_packages()
{
# NOTE(aababilov): the latter operations require some packages,
# so, begin from installation
if [ -n "$REQUIRES" ]; then
echo "Installing packages: $(echo $REQUIRES)"
for rpm in $REQUIRES; do
yum_install "$rpm"
if [ "$?" != "0" ]; then
echo "Failed installing $rpm"
return 1
fi
done
fi
CONFLICTS=$(python -c "import yaml
packages = set()
try:
@ -132,16 +145,6 @@ for pkg in packages:
echo "Removing conflicting packages: $(echo $CONFLICTS)"
yum erase $YUM_OPTS $CONFLICTS
fi
if [ -n "$REQUIRES" ]; then
echo "Installing packages: $(echo $REQUIRES)"
for rpm in $REQUIRES; do
yum_install "$rpm"
if [ "$?" != "0" ]; then
echo "Failed installing $rpm"
return 1
fi
done
fi
}
bootstrap_python_rpms()