From 68c3a39ad02ee4d35b8e788d6f8d39f32d4f728c Mon Sep 17 00:00:00 2001 From: Alessio Ababilov Date: Tue, 25 Jun 2013 10:58:32 +0300 Subject: [PATCH] smithy: remove conflicting packages Change-Id: I39b493311c0372ab5997663bb34221c6aa64200d --- smithy | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/smithy b/smithy index cbfb02b2..8a8c085e 100755 --- a/smithy +++ b/smithy @@ -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