[openstack-nova/el6-folsom] adjust to support python-migrate-0.6

Pádraig Brady pbrady at fedoraproject.org
Tue Oct 30 18:27:39 UTC 2012


commit 86b60a7aad1e90e5ff502016c94a36a7167bed6c
Author: Pádraig Brady <P at draigBrady.com>
Date:   Tue Oct 30 17:58:04 2012 +0000

    adjust to support python-migrate-0.6
    
    python-migrate-0.7 is backward incompatible with 0.6,
    so rather than having to worry about updating migrate,
    ajust nova slightly to use the older interface when available.

 openstack-nova-newdeps.patch |   17 +++++++++++++++++
 openstack-nova.spec          |    5 ++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/openstack-nova-newdeps.patch b/openstack-nova-newdeps.patch
index bcc7829..0293a7d 100644
--- a/openstack-nova-newdeps.patch
+++ b/openstack-nova-newdeps.patch
@@ -39,3 +39,20 @@ diff -Naur -Naru nova-2012.2.orig/nova/__init__.py nova-2012.2/nova/__init__.py
  import gettext
  
  
+diff -Naur nova-2012.2.orig/nova/db/sqlalchemy/migration.py nova-2012.2/nova/db/sqlalchemy/migration.py
+--- nova-2012.2.orig/nova/db/sqlalchemy/migration.py	2012-10-30 17:51:47.073636210 +0000
++++ nova-2012.2/nova/db/sqlalchemy/migration.py	2012-10-30 17:56:03.974051764 +0000
+@@ -57,7 +57,12 @@
+ 
+ 
+ # NOTE(jkoelker) Delay importing migrate until we are patched
+-from migrate import exceptions as versioning_exceptions
++try:
++    # Try the more specific path first (migrate <= 0.6)
++    from migrate.versioning import exceptions as versioning_exceptions
++except ImportError:
++    # Use the newer path (migrate >= 0.7)
++    from migrate import exceptions as versioning_exceptions
+ from migrate.versioning import api as versioning_api
+ from migrate.versioning.repository import Repository
+ 
diff --git a/openstack-nova.spec b/openstack-nova.spec
index 336316b..82ff9dd 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -2,7 +2,7 @@
 
 Name:             openstack-nova
 Version:          2012.2
-Release:          1%{?dist}
+Release:          2%{?dist}
 Summary:          OpenStack Compute (nova)
 
 Group:            Applications/System
@@ -749,6 +749,9 @@ fi
 %endif
 
 %changelog
+* Tue Oct 30 2012 Pádraig Brady <pbrady at redhat.com> - 2012.2-2
+- Add support for python-migrate-0.6
+
 * Thu Oct 11 2012 Pádraig Brady <pbrady at redhat.com> - 2012.2-1
 - Update to folsom final
 


More information about the scm-commits mailing list