[openstack-nova/el6: 8/8] use updated parallel install versions of epel packages

Pádraig Brady pbrady at fedoraproject.org
Thu Dec 1 18:26:54 UTC 2011


commit 7ba3ce7a92a21de104b0dde02d258c4a69baa891
Author: Pádraig Brady <P at draigBrady.com>
Date:   Thu Dec 1 18:24:17 2011 +0000

    use updated parallel install versions of epel packages
    
    Give preference to these updated parallel install modules
    WebOb >= 1.0 (currently python-webob1.0-1.0.8)
    SQLAlchemy >= 0.6.3 (currently python-sqlachemy0.7-0.7.3)

 openstack-nova-newdeps.patch |   32 ++++++++++++++++++++++++++++++++
 openstack-nova.spec          |   11 +++++++----
 2 files changed, 39 insertions(+), 4 deletions(-)
---
diff --git a/openstack-nova-newdeps.patch b/openstack-nova-newdeps.patch
new file mode 100644
index 0000000..e55d183
--- /dev/null
+++ b/openstack-nova-newdeps.patch
@@ -0,0 +1,32 @@
+--- nova-2011.3.orig/nova/__init__.py	2011-11-24 12:44:24.681458224 +0000
++++ nova-2011.3/nova/__init__.py	2011-11-24 13:20:00.567485395 +0000
+@@ -31,6 +31,29 @@
+ .. moduleauthor:: Andy Smith <andy at anarkystic.com>
+ """
+ 
++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)
++
++print replace_dist("WebOb >= 1.0")
++print replace_dist("SQLAlchemy >= 0.6.3")
++
++
+ import gettext
+ 
+ 
diff --git a/openstack-nova.spec b/openstack-nova.spec
index 81c539d..b3537f3 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -77,6 +77,7 @@ Patch40:          0040-Refactor-ietadm-tgtadm-calls-out-into-helper-classes.patc
 
 # These are fedora specific
 Patch100:         openstack-nova-nonet.patch
+Patch101:         openstack-nova-newdeps.patch
 
 # These are additional patches for upstream but not maintained at the above repo
 Patch200:         0001-Bug-898257-abstract-out-disk-image-access-methods.patch
@@ -145,11 +146,11 @@ Requires:         python-lxml
 Requires:         python-mox
 Requires:         python-redis
 Requires:         python-routes
-Requires:         python-sqlalchemy
+Requires:         python-sqlalchemy0.7
 Requires:         python-tornado
 Requires:         python-twisted-core
 Requires:         python-twisted-web
-Requires:         python-webob
+Requires:         python-webob1.0
 Requires:         python-netaddr
 Requires:         python-glance
 Requires:         python-novaclient
@@ -189,11 +190,11 @@ BuildRequires:    python-boto
 BuildRequires:    python-eventlet
 BuildRequires:    python-gflags
 BuildRequires:    python-routes
-BuildRequires:    python-sqlalchemy
+BuildRequires:    python-sqlalchemy0.7
 BuildRequires:    python-tornado
 BuildRequires:    python-twisted-core
 BuildRequires:    python-twisted-web
-BuildRequires:    python-webob
+BuildRequires:    python-webob1.0
 # while not strictly required, quiets the build down when building docs.
 BuildRequires:    python-carrot, python-mox, python-suds, m2crypto, bpython, python-memcached, python-migrate
 
@@ -255,6 +256,7 @@ This package contains documentation files for nova.
 
 # apply local patches
 %patch100 -p1
+%patch101 -p1
 
 # apply misc patches
 %patch200 -p1
@@ -441,6 +443,7 @@ fi
 
 %changelog
 * Wed Nov 30 2011 Pádraig Brady <P at draigBrady.com> - 2011.3-10
+- Use updated parallel install versions of epel packages
 - Add libguestfs support
 
 * Tue Nov 29 2011 Pádraig Brady <P at draigBrady.com> - 2011.3-9


More information about the scm-commits mailing list