smithy: remove conflicting packages

Change-Id: I39b493311c0372ab5997663bb34221c6aa64200d
This commit is contained in:
Alessio Ababilov 2013-06-25 10:58:32 +03:00
parent 6b3c4292cd
commit 68c3a39ad0

12
smithy
View File

@ -116,6 +116,18 @@ bootstrap_epel()
bootstrap_rpm_packages()
{
CONFLICTS=$(python -c "import yaml
packages = set()
try:
for i in yaml.safe_load(open('$DISTRO_CONFIG'))['components'].itervalues():
for j in i.get('conflicts', []):
packages.add(j.get('name'))
except KeyError:
pass
for pkg in packages:
if pkg:
print pkg
")
if [ -n "$CONFLICTS" ]; then
echo "Removing conflicting packages: $(echo $CONFLICTS)"
yum erase $YUM_OPTS $CONFLICTS