From f7740e98f54de40e5fc1de605c7881f07d04d978 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 18 Feb 2011 22:04:12 +0100 Subject: [PATCH] Imported Debian patch 0.5.1+dfsg-3 --- debian/changelog | 9 +++++++++ debian/roundcube-core.postinst | 32 +++++++++++++++++++++----------- debian/roundcube-plugins.install | 1 + 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6e2c388..947a76d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +roundcube (0.5.1+dfsg-3) unstable; urgency=low + + * Install show_additional_headers plugin in roundcube-plugins package. + * Use dbconfig-common to force some upgrade commands using some ugly + hacks. This should fix any remaining problems with MySQL + upgrade. Closes: #613586. + + -- Vincent Bernat Fri, 18 Feb 2011 22:04:12 +0100 + roundcube (0.5.1+dfsg-2) unstable; urgency=low * Remove all "ADD INDEX" from MySQL 0.5-1 upgrade file and put them in diff --git a/debian/roundcube-core.postinst b/debian/roundcube-core.postinst index 64bdf5d..59f85f7 100644 --- a/debian/roundcube-core.postinst +++ b/debian/roundcube-core.postinst @@ -39,21 +39,31 @@ apache_install() { case "$1" in configure) - # We try to fix an incomplete upgrade (see #610725) + # We try to fix an incomplete upgrade (see #610725 and #613586) if [ -n "$2" ] && dpkg --compare-versions "$2" le 0.5.1+dfsg-2; then db_get roundcube/dbconfig-upgrade || true if [ x"$RET" = x"true" ]; then - # Ok, we may need to do some upgrade steps. Let's get - # database parameters - eval `sed -n 's/^\$\(.*\);$/\1/p' /etc/roundcube/debian-db.php` - if [ x"$dbtype" = x"mysql" ]; then - echo "Fixing MySQL indexes (you can ignore errors)..." - MYSQLARGS="-f -u $dbuser -p$dbpass $dbname" - [ -z "$dbserver" ] || MYSQLARGS="-h $dbserver $MYSQLARGS" - [ -z "$dbport" ] || MYSQLARGS="-P $dbport $MYSQLARGS" - cat < "$workdir/mysql" +#!/bin/sh +"$real_mysql" "\$@" -f +EOF + chmod +x "$workdir/mysql" + PATH="$workdir:$PATH" + dbc_mysql_exec_file \ + /usr/share/dbconfig-common/data/roundcube/upgrade/mysql/0.5-1 || true + PATH="$oldpath" + rm -rf "$workdir" + fi + cat <