From 52e7d8886972ce51c87cce931e7413810e069990 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 8 Sep 2015 20:48:21 +0200 Subject: [PATCH] Only depend on python-importlib on RHEL6 and older To avoid a dependency on importlib on non-rhel platforms, check for rhel first. Change-Id: I0a2d6777cc338aeef0ba83b40838d631e9f2d040 Partial-Bug: #1488627 --- common/rpm/contrail-nodemgr.spec | 2 +- common/rpm/contrail-openstack-analytics.spec | 2 +- common/rpm/contrail-openstack-config.spec | 5 +---- common/rpm/contrail-openstack-havana-config.spec | 2 +- common/rpm/contrail-openstack-icehouse-config.spec | 2 +- common/rpm/contrail-openstack-icehouse.spec | 2 +- common/rpm/contrail-openstack-juno.spec | 2 +- common/rpm/contrail-openstack.spec | 5 +---- 8 files changed, 8 insertions(+), 14 deletions(-) diff --git a/common/rpm/contrail-nodemgr.spec b/common/rpm/contrail-nodemgr.spec index b810097b4..4c19f7ba3 100644 --- a/common/rpm/contrail-nodemgr.spec +++ b/common/rpm/contrail-nodemgr.spec @@ -35,7 +35,7 @@ Requires: xmltodict >= 0.7.0 Requires: python-bottle >= 0.11.6 Requires: python-contrail >= %{_verstr}-%{_relstr} Requires: ntp -%if 0%{?rhel} <= 6 +%if 0%{?rhel} && 0%{?rhel} <= 6 Requires: python-importlib %endif diff --git a/common/rpm/contrail-openstack-analytics.spec b/common/rpm/contrail-openstack-analytics.spec index a6db40cc2..d98347e4f 100644 --- a/common/rpm/contrail-openstack-analytics.spec +++ b/common/rpm/contrail-openstack-analytics.spec @@ -32,7 +32,7 @@ Requires: contrail-setup >= %{_verstr}-%{_relstr} Requires: contrail-utils >= %{_verstr}-%{_relstr} Requires: contrail-nodemgr >= %{_verstr}-%{_relstr} Requires: python-contrail >= %{_verstr}-%{_relstr} -%if 0%{?rhel} <= 6 +%if 0%{?rhel} && 0%{?rhel} <= 6 Requires: python-importlib %endif diff --git a/common/rpm/contrail-openstack-config.spec b/common/rpm/contrail-openstack-config.spec index a7a03d990..49332e621 100644 --- a/common/rpm/contrail-openstack-config.spec +++ b/common/rpm/contrail-openstack-config.spec @@ -37,9 +37,6 @@ Requires: mysql-server Requires: contrail-setup >= %{_verstr}-%{_relstr} Requires: contrail-utils >= %{_verstr}-%{_relstr} Requires: python-zope-interface -%if 0%{?rhel} -Requires: python-importlib -%endif Requires: euca2ools >= 1.0-2contrail Requires: m2crypto Requires: java-1.7.0-openjdk @@ -51,7 +48,7 @@ Requires: contrail-nodemgr >= %{_verstr}-%{_relstr} Requires: ifmap-server >= 0.3.2-2contrail Requires: contrail-config-openstack >= %{_verstr}-%{_relstr} Requires: python-contrail >= %{_verstr}-%{_relstr} -%if 0%{?rhel} <= 6 +%if 0%{?rhel} && 0%{?rhel} <= 6 Requires: python-importlib %endif diff --git a/common/rpm/contrail-openstack-havana-config.spec b/common/rpm/contrail-openstack-havana-config.spec index b01b2f619..728a84d31 100644 --- a/common/rpm/contrail-openstack-havana-config.spec +++ b/common/rpm/contrail-openstack-havana-config.spec @@ -45,7 +45,7 @@ Requires: contrail-config-openstack >= %{_verstr}-%{_relstr} Requires: python-bottle Requires: contrail-nodemgr >= %{_verstr}-%{_relstr} Requires: ifmap-server >= 0.3.2-2contrail -%if 0%{?rhel} <= 6 +%if 0%{?rhel} && 0%{?rhel} <= 6 Requires: python-importlib %endif diff --git a/common/rpm/contrail-openstack-icehouse-config.spec b/common/rpm/contrail-openstack-icehouse-config.spec index e924c7ced..7a3e823fa 100644 --- a/common/rpm/contrail-openstack-icehouse-config.spec +++ b/common/rpm/contrail-openstack-icehouse-config.spec @@ -45,7 +45,7 @@ Requires: contrail-config-openstack >= %{_verstr}-%{_relstr} Requires: python-bottle Requires: contrail-nodemgr >= %{_verstr}-%{_relstr} Requires: ifmap-server >= 0.3.2-2contrail -%if 0%{?rhel} <= 6 +%if 0%{?rhel} && 0%{?rhel} <= 6 Requires: python-importlib %endif diff --git a/common/rpm/contrail-openstack-icehouse.spec b/common/rpm/contrail-openstack-icehouse.spec index 376de6988..9063abb0b 100644 --- a/common/rpm/contrail-openstack-icehouse.spec +++ b/common/rpm/contrail-openstack-icehouse.spec @@ -41,7 +41,7 @@ Requires: qpid-cpp-server Requires: haproxy Requires: rabbitmq-server >= 3.5.0 Requires: supervisor -%if 0%{?rhel} <= 6 +%if 0%{?rhel} && 0%{?rhel} <= 6 Requires: python-importlib %endif %if 0%{?centos} >= 6 diff --git a/common/rpm/contrail-openstack-juno.spec b/common/rpm/contrail-openstack-juno.spec index 8bf501165..242e6cfaa 100644 --- a/common/rpm/contrail-openstack-juno.spec +++ b/common/rpm/contrail-openstack-juno.spec @@ -41,7 +41,7 @@ Requires: qpid-cpp-server Requires: haproxy Requires: rabbitmq-server Requires: supervisor -%if 0%{?rhel} <= 6 +%if 0%{?rhel} && 0%{?rhel} <= 6 Requires: python-importlib %endif %if 0%{?centos} >= 6 diff --git a/common/rpm/contrail-openstack.spec b/common/rpm/contrail-openstack.spec index 53e34db5f..72216422f 100644 --- a/common/rpm/contrail-openstack.spec +++ b/common/rpm/contrail-openstack.spec @@ -36,16 +36,13 @@ Requires: memcached Requires: openstack-nova-novncproxy = 2013.2-2contrail Requires: python-glance Requires: python-glanceclient -%if 0%{?rhel} -Requires: python-importlib -%endif Requires: euca2ools >= 1.0-2contrail Requires: m2crypto Requires: qpid-cpp-server Requires: haproxy Requires: rabbitmq-server >= 3.5.0 Requires: supervisor -%if 0%{?rhel} <= 6 +%if 0%{?rhel} && 0%{?rhel} <= 6 Requires: python-importlib %endif