I was building the subversion 1.7.0-alpha2 pre-release in a CentOS 5.6
environment and encountered an interesting problem with the new
dependency for python's sqlite support.
CentOS seems to name the site python library 'sqlite' while the
subversion system expects to import 'sqlite3'. This causes the test to
halt accordingly on the first python test when the import fails.
I'm not sure if the solution is to have the distro packager of the
python-sqlite package update the site paths (or at least symlink sqlite3
-> sqlite) or to patch the svntest library to handle this case. Both
methods worked as expected for me, and allowed the test suite to continue.
In the event we want to support this within the 1.7.x test suite, I've
attached a patch to svntest/__init__.py that adds an additional try
clause to import sqlite as sqlite3. I'm not sure if there are any
historical implications (read: a previously named sqlite library) to
this patch.
If the Subversion devs view this as a completely upstream problem I may
file a bug there, but the chances of it getting fixed are pretty low
since CentOS just repackages what RHEL provides.
--
Josh
diff -Naru tree-old/subversion/tests/cmdline/svntest/__init__.py tree-new/subversion/tests/cmdline/svntest/__init__.py
--- tree-old/subversion/tests/cmdline/svntest/__init__.py 2011-07-01 19:37:42.000000000 +0000
+++ tree-new/subversion/tests/cmdline/svntest/__init__.py 2011-07-01 21:27:10.000000000 +0000
@@ -36,10 +36,13 @@
import sqlite3
except ImportError:
try:
- from pysqlite2 import dbapi2 as sqlite3
+ import sqlite as sqlite3
except ImportError:
- sys.stderr.write('[SKIPPED] Python sqlite3 module required\n')
- sys.exit(0)
+ try:
+ from pysqlite2 import dbapi2 as sqlite3
+ except ImportError:
+ sys.stderr.write('[SKIPPED] Python sqlite3 module required\n')
+ sys.exit(0)
# don't export this name
del sys