[openstack-neutron/el6-havana] Updated patches from el6-havana-patches
Terry Wilson
otherwiseguy at fedoraproject.org
Fri Aug 2 20:34:48 UTC 2013
commit b5d4296f622d44e0f8e20f814027f1827bcb5c86
Author: Terry Wilson <twilson at redhat.com>
Date: Fri Aug 2 15:33:55 2013 -0500
Updated patches from el6-havana-patches
...-use-parallel-installed-versions-in-RHEL6.patch | 53 ++++++++++++++++++++
openstack-neutron.spec | 1 +
2 files changed, 54 insertions(+), 0 deletions(-)
---
diff --git a/0001-use-parallel-installed-versions-in-RHEL6.patch b/0001-use-parallel-installed-versions-in-RHEL6.patch
new file mode 100644
index 0000000..89b68d7
--- /dev/null
+++ b/0001-use-parallel-installed-versions-in-RHEL6.patch
@@ -0,0 +1,53 @@
+From 5c5194e0b5257939f55ff04f6d1d6011d376f1f8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P at draigBrady.com>
+Date: Fri, 13 Apr 2012 17:24:40 +0100
+Subject: [PATCH] use parallel installed versions in RHEL6
+
+of webob sqlalchemy python-routes and paste-deploy
+
+Change-Id: I290f56eae61c87893639a9e5d29f7fff760452cf
+---
+ neutron/__init__.py | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+diff --git a/neutron/__init__.py b/neutron/__init__.py
+index b2c81bd..764eee4 100644
+--- a/neutron/__init__.py
++++ b/neutron/__init__.py
+@@ -15,6 +15,36 @@
+ # License for the specific language governing permissions and limitations
+ # under the License.
+
++import sys
++import pkg_resources
++
++# If there is a conflicting non egg module,
++# i.e. an older standard system module installed,
++# then replace it with this requirement
++def replace_dist(requirement):
++ try:
++ return pkg_resources.require(requirement)
++ except pkg_resources.VersionConflict:
++ e = sys.exc_info()[1]
++ dist=e.args[0]
++ req=e.args[1]
++ if dist.key == req.key and not dist.location.endswith('.egg'):
++ del pkg_resources.working_set.by_key[dist.key]
++ # We assume there is no need to adjust sys.path
++ # and the associated pkg_resources.working_set.entries
++ return pkg_resources.require(requirement)
++
++replace_dist("WebOb >= 1.0")
++replace_dist("SQLAlchemy >= 0.6.3")
++replace_dist("Routes >= 1.12.3")
++
++replace_dist("PasteDeploy >= 1.5.0")
++# This hack is needed because replace_dist() results in
++# the standard paste module path being at the start of __path__.
++# TODO: See can we get pkg_resources to do the right thing directly
++import paste
++paste.__path__.insert(0, paste.__path__.pop(-1))
++
+ import gettext
+
+
diff --git a/openstack-neutron.spec b/openstack-neutron.spec
index ace4d7e..e5d3c13 100644
--- a/openstack-neutron.spec
+++ b/openstack-neutron.spec
@@ -50,6 +50,7 @@ Source40: neutron-mlnx-agent.upstart
#
# patches_base=2013.2.b2
#
+Patch0001: 0001-use-parallel-installed-versions-in-RHEL6.patch
BuildArch: noarch
More information about the scm-commits
mailing list