[Python-modules-commits] r7926 - in packages/python-axiom/trunk/debian (5 files)

bernat at users.alioth.debian.org bernat at users.alioth.debian.org
Wed Mar 18 21:11:23 UTC 2009


    Date: Wednesday, March 18, 2009 @ 21:11:23
  Author: bernat
Revision: 7926

Add a patch to handle sqlite >= 3.6.4. Closes: #520338. Older
databases need to be fixed by hand.

The patch is not complete: upgrading from old databases still fail.

Added:
  packages/python-axiom/trunk/debian/patches/
  packages/python-axiom/trunk/debian/patches/axiom-indexed.diff
Modified:
  packages/python-axiom/trunk/debian/changelog
  packages/python-axiom/trunk/debian/control
  packages/python-axiom/trunk/debian/rules

Modified: packages/python-axiom/trunk/debian/changelog
===================================================================
--- packages/python-axiom/trunk/debian/changelog	2009-03-18 20:53:27 UTC (rev 7925)
+++ packages/python-axiom/trunk/debian/changelog	2009-03-18 21:11:23 UTC (rev 7926)
@@ -6,6 +6,8 @@
 
   [ Vincent Bernat ]
   * New upstream release.
+  * Add a patch to handle sqlite >= 3.6.4. Closes: #520338. Older
+    databases need to be fixed by hand.
 
  -- Vincent Bernat <bernat at debian.org>  Wed, 18 Mar 2009 21:18:39 +0100
 

Modified: packages/python-axiom/trunk/debian/control
===================================================================
--- packages/python-axiom/trunk/debian/control	2009-03-18 20:53:27 UTC (rev 7925)
+++ packages/python-axiom/trunk/debian/control	2009-03-18 21:11:23 UTC (rev 7926)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Stefano Zacchiroli <zack at debian.org>, Tristan Seligmann <mithrandi at mithrandi.net>, Vincent Bernat <bernat at debian.org>
-Build-Depends: debhelper (>= 6), cdbs (>= 0.4.43), python, python-support (>= 0.4)
+Build-Depends: debhelper (>= 6), cdbs (>= 0.4.43), python, python-support (>= 0.4), patchutils (>= 0.2.25)
 Build-Depends-Indep: python-twisted-core, python-twisted-conch, python-epsilon (>= 0.5.11), python-pysqlite2, python-zopeinterface
 Homepage: http://www.divmod.org/trac/wiki/DivmodAxiom
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-axiom/trunk/

Added: packages/python-axiom/trunk/debian/patches/axiom-indexed.diff
===================================================================
--- packages/python-axiom/trunk/debian/patches/axiom-indexed.diff	                        (rev 0)
+++ packages/python-axiom/trunk/debian/patches/axiom-indexed.diff	2009-03-18 21:11:23 UTC (rev 7926)
@@ -0,0 +1,50 @@
+Since sqlite 3.6.4, "indexed" is now a keyword. It needs to be properly quoted. See:
+ http://divmod.org/trac/ticket/2770
+
+--- a/axiom/store.py	2009-03-13 18:53:58.000000000 +0100
++++ a/axiom/store.py	2009-03-18 22:07:24.000000000 +0100
+@@ -1409,7 +1409,7 @@
+         # from the schema and the sorted() here doesn't seem to be any faster
+         # than doing this.
+         persistedSchema = sorted(self.querySchemaSQL(
+-            "SELECT attribute, type_id, sqltype, indexed, "
++            "SELECT attribute, type_id, sqltype, \"indexed\", "
+             "pythontype, docstring FROM *DATABASE*.axiom_attributes "))
+ 
+         # This is trivially (but measurably!) faster than getattr(attributes,
+--- a/axiom/_schema.py	(revision 17031)
++++ a/axiom/_schema.py	(working copy)
+@@ -28,7 +28,7 @@
+ CREATE TABLE *DATABASE*.axiom_attributes (
+     type_id INTEGER,
+     row_offset INTEGER,
+-    indexed BOOLEAN,
++    "indexed" BOOLEAN,
+     sqltype VARCHAR,
+     allow_none BOOLEAN,
+     pythontype VARCHAR,
+@@ -47,13 +47,13 @@
+ HAS_SCHEMA_FEATURE = ("SELECT COUNT(oid) FROM *DATABASE*.sqlite_master "
+                       "WHERE type = ? AND name = ?")
+ 
+-IDENTIFYING_SCHEMA = ('SELECT indexed, sqltype, allow_none, attribute '
++IDENTIFYING_SCHEMA = ('SELECT "indexed", sqltype, allow_none, attribute '
+                       'FROM *DATABASE*.axiom_attributes WHERE type_id = ? '
+                       'ORDER BY row_offset')
+ 
+ ADD_SCHEMA_ATTRIBUTE = (
+     'INSERT INTO *DATABASE*.axiom_attributes '
+-    '(type_id, row_offset, indexed, sqltype, allow_none, attribute, docstring, pythontype) '
++    '(type_id, row_offset, "indexed", sqltype, allow_none, attribute, docstring, pythontype) '
+     'VALUES (?, ?, ?, ?, ?, ?, ?, ?)')
+ 
+ ALL_TYPES = 'SELECT oid, module, typename, version FROM *DATABASE*.axiom_types'
+@@ -61,7 +61,7 @@
+ GET_GREATER_VERSIONS_OF_TYPE = ('SELECT version FROM *DATABASE*.axiom_types '
+                                 'WHERE typename = ? AND version > ?')
+ 
+-SCHEMA_FOR_TYPE = ('SELECT indexed, pythontype, attribute, docstring '
++SCHEMA_FOR_TYPE = ('SELECT "indexed", pythontype, attribute, docstring '
+                    'FROM *DATABASE*.axiom_attributes '
+                    'WHERE type_id = ?')
+ 

Modified: packages/python-axiom/trunk/debian/rules
===================================================================
--- packages/python-axiom/trunk/debian/rules	2009-03-18 20:53:27 UTC (rev 7925)
+++ packages/python-axiom/trunk/debian/rules	2009-03-18 21:11:23 UTC (rev 7926)
@@ -3,6 +3,7 @@
 DEB_INSTALL_MANPAGES_python-axiom := debian/axiomatic.1
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/python-distutils.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
 PKGDIR=debian/python-axiom/
 
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))




More information about the Python-modules-commits mailing list