summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-04 16:30:37 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-04 16:30:37 +0100
commit31c00e8ab2c9252c05d655fa3430b6692919a595 (patch)
treee605cc5322743b62e1836b25de41cee2b5915d24
parent6ef876162465a0e8ca6f7ec2da21eb87f007a931 (diff)
downloadpykolab-31c00e8ab2c9252c05d655fa3430b6692919a595.tar.gz
Add horde_cache to sql schema files,
prevent duplicates
-rw-r--r--pykolab/setup/setup_roundcube.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index a5ce45c..88965f2 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -110,12 +110,21 @@ def execute(*args, **kw):
for root, directories, filenames in os.walk('/usr/share/doc/'):
for filename in filenames:
if filename.startswith('mysql.initial') and filename.endswith('.sql'):
- schema_files.append(os.path.join(root,filename))
+ schema_filepath = os.path.join(root,filename)
+ if not schema_filepath in schema_files:
+ schema_files.append(schema_filepath)
+
+ if filename.startswith('horde_cache') and filename.endswith('.sql'):
+ schema_filepath = os.path.join(root,filename)
+ if not schema_filepath in schema_files:
+ schema_files.append(schema_filepath)
for root, directories, filenames in os.walk('/usr/share/roundcubemail/plugins/calendar/drivers/kolab/'):
for filename in filenames:
if filename.startswith('mysql') and filename.endswith('.sql'):
- schema_files.append(os.path.join(root,filename))
+ schema_filepath = os.path.join(root,filename)
+ if not schema_filepath in schema_files:
+ schema_files.append(schema_filepath)
p1 = subprocess.Popen(['echo', 'create database roundcube;'], stdout=subprocess.PIPE)
p2 = subprocess.Popen(['mysql', '--defaults-file=/tmp/kolab-setup-my.cnf'], stdin=p1.stdout)