[devtools] force locale to C for postgresql test clusters
Avoids initdb failure with e.g. iso8859-X locale and utf-8 encoding.
--- a/devtools/__init__.py Tue Feb 04 11:23:58 2014 +0100
+++ b/devtools/__init__.py Mon Feb 10 16:06:16 2014 +0100
@@ -545,7 +545,7 @@
super(PostgresTestDataBaseHandler, self).__init__(config)
datadir = join(self.config.apphome, 'pgdb')
if not exists(datadir):
- subprocess.check_call(['initdb', '-D', datadir, '-E', 'utf-8'])
+ subprocess.check_call(['initdb', '-D', datadir, '-E', 'utf-8', '--locale=C'])
port = self.system_source['db-port']
subprocess.check_call(['pg_ctl', 'start', '-w', '-D', datadir, '-o', '-h "" -k /tmp -p %s' % port])
self.__CTL.add(datadir)