-From 632186c1a4e3d971bab1d017ea3289e92c85d86c Mon Sep 17 00:00:00 2001
+From c8b9384ccf0e9c69f35978f3abbb5e5d5638d859 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Wed, 24 Oct 2012 13:44:37 +0100
Subject: [PATCH] Use updated parallel install versions of epel package
-Use sqlalchemy >= 0.6.3 WebOb >= 1.0 Routes >= 1.12.3 PasteDeploy >= 1.5.0
+Use sqlalchemy >= 0.6.3 WebOb >= 1.2 Routes >= 1.12.3 PasteDeploy >= 1.5.0
and depend on the parallel installable
versions of these packages to satisfy those requirements.
Delve into pkg_resources a little to get it to modify sys.path,
so that our parallel installed egg takes precedence over the
system default module versions.
-(cherry picked from commit 7b25747ffc21d0771e864f57ab2088725c8851f0)
-
-Conflicts:
- bin/cinder-manage
---
- bin/cinder-manage | 7 ++++---
+ bin/cinder-manage | 4 +++-
cinder/__init__.py | 30 ++++++++++++++++++++++++++++++
cinder/db/sqlalchemy/migration.py | 7 ++++++-
- 3 files changed, 40 insertions(+), 4 deletions(-)
+ 3 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/bin/cinder-manage b/bin/cinder-manage
-index de7955d..364944a 100755
+index 3c05d77..9474e2e 100755
--- a/bin/cinder-manage
+++ b/bin/cinder-manage
-@@ -59,9 +59,6 @@ import os
- import sys
- import uuid
-
--from sqlalchemy import create_engine, MetaData, Table
--from sqlalchemy.ext.declarative import declarative_base
--from sqlalchemy.orm import sessionmaker
+@@ -62,7 +62,6 @@ import sys
+ from oslo.config import cfg
+-
# If ../cinder/__init__.py exists, add ../ to Python search path, so that
-@@ -87,6 +84,10 @@ from cinder.openstack.common import uuidutils
+ # it will override what happens to be installed in /usr/(local/)lib/python...
+ POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
+@@ -84,6 +83,9 @@ from cinder.openstack.common import uuidutils
from cinder import utils
from cinder import version
+from sqlalchemy import create_engine, MetaData, Table
-+from sqlalchemy.orm import sessionmaker
+from sqlalchemy.ext.declarative import declarative_base
-+
- FLAGS = flags.FLAGS
++from sqlalchemy.orm import sessionmaker
+ CONF = cfg.CONF
diff --git a/cinder/__init__.py b/cinder/__init__.py
-index f8db8e8..1b4ac39 100644
+index d765b08..720320e 100644
--- a/cinder/__init__.py
+++ b/cinder/__init__.py
-@@ -31,6 +31,36 @@
+@@ -30,3 +30,33 @@
+ .. moduleauthor:: Manish Singh <yosh@gimp.org>
.. moduleauthor:: Andy Smith <andy@anarkystic.com>
"""
-
++
+import sys
+import pkg_resources
+
+ # and the associated pkg_resources.working_set.entries
+ return pkg_resources.require(requirement)
+
-+replace_dist("WebOb >= 1.0")
++replace_dist("WebOb >= 1.2")
+replace_dist("SQLAlchemy >= 0.6.3")
+replace_dist("Routes >= 1.12.3")
+
+# 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/cinder/db/sqlalchemy/migration.py b/cinder/db/sqlalchemy/migration.py
-index 5365d9c..e2fcd83 100644
+index e2463bc..9ba7b73 100644
--- a/cinder/db/sqlalchemy/migration.py
+++ b/cinder/db/sqlalchemy/migration.py
-@@ -57,7 +57,12 @@ if (not hasattr(migrate, '__version__') or
+@@ -56,7 +56,12 @@ if (not hasattr(migrate, '__version__') or
# NOTE(jkoelker) Delay importing migrate until we are patched