# HG changeset patch # User Pascal Volk # Date 1322328539 0 # Node ID fb210a116f18612693f22ebc7901c3afb37c6339 # Parent 428ee9cdf1b2f5372c736dc659dbab4e0a1e748e update_config: Write the old package install dir to a tmp file. upgrade: Remove old CamelCase files. Removed some unused variables. diff -r 428ee9cdf1b2 -r fb210a116f18 update_config.py --- a/update_config.py Sun Nov 13 20:19:40 2011 +0000 +++ b/update_config.py Sat Nov 26 17:28:59 2011 +0000 @@ -8,7 +8,18 @@ from time import time from ConfigParser import ConfigParser from shutil import copy2 -from VirtualMailManager.constants.VERSION import VERSION +try: + from VirtualMailManager.constants.VERSION import VERSION +except ImportError: + os.sys.stderr.write('error: no pre 0.6.0 version information found\n') + raise SystemExit(2) + +# we have to remove the old CamelCase files +import VirtualMailManager +vmm_inst_dir = os.path.dirname(VirtualMailManager.__file__) +tmp_info = open('/tmp/vmm_inst_dir', 'w') +tmp_info.write(vmm_inst_dir) +tmp_info.close() try: import psycopg2 diff -r 428ee9cdf1b2 -r fb210a116f18 upgrade.sh --- a/upgrade.sh Sun Nov 13 20:19:40 2011 +0000 +++ b/upgrade.sh Sat Nov 26 17:28:59 2011 +0000 @@ -7,9 +7,6 @@ PATH=/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PREFIX=/usr/local -PF_CONFDIR=$(postconf -h config_directory) -PF_GID=$(id -g $(postconf -h mail_owner)) -POSTCONF=$(which postconf) DOVECOT_VERS=$(dovecot --version | awk '{print $1}') LOCALE_DIR=${PREFIX}/share/locale DOC_DIR=${PREFIX}/share/doc/vmm @@ -21,7 +18,6 @@ DOCS="ChangeLog COPYING NEWS INSTALL README" INSTALL_OPTS="-g 0 -o 0 -p" -INSTALL_OPTS_CF="-b -m 0640 -g ${PF_GID} -o 0 -p" if [ $(id -u) -ne 0 ]; then echo "Run this script as root." @@ -38,11 +34,17 @@ echo "please read the upgrade instructions at http://vmm.localdomain.org/" exit 1 elif [ $rv -ne 0 ]; then - echo "Sorry, something went wrong. Please file a bug:" - echo "https://sourceforge.net/tracker/?group_id=213727" + echo "Sorry, something went wrong. Please file a bug at:" + echo "https://bitbucket.org/pvo/vmm/issues" exit 1 fi +# remove old CamelCase files +if [ -f /tmp/vmm_inst_dir ] ; then + rm -rf `cat /tmp/vmm_inst_dir` + rm -f /tmp/vmm_inst_dir +fi + python setup.py -q install --force --prefix ${PREFIX} python setup.py clean --all >/dev/null