[openstack-swift/el6] Use updated parallel install versions of epel package

Alan Pevec apevec at fedoraproject.org
Wed Jan 4 23:19:35 UTC 2012


commit d95e7d50818e357532e93e77d108ff51fc8ec4a6
Author: Alan Pevec <apevec at redhat.com>
Date:   Thu Jan 5 00:17:59 2012 +0100

    Use updated parallel install versions of epel package
    
    add missing patch

 openstack-swift-newdeps.patch |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/openstack-swift-newdeps.patch b/openstack-swift-newdeps.patch
new file mode 100644
index 0000000..a7e38ba
--- /dev/null
+++ b/openstack-swift-newdeps.patch
@@ -0,0 +1,29 @@
+diff -ru swift-1.4.4-ORIG/swift/__init__.py swift-1.4.4/swift/__init__.py
+--- swift-1.4.4-ORIG/swift/__init__.py	2011-11-24 14:59:50.000000000 +0100
++++ swift-1.4.4/swift/__init__.py	2012-01-04 00:09:10.122030579 +0100
+@@ -1,3 +1,25 @@
++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")
++
++
+ import gettext
+ 
+ 


More information about the scm-commits mailing list