[DRE-commits] [SCM] redmine.git branch, master-experimental, updated. debian/1.4.4+dfsg1-1-99-gff47c9f
Ondřej Surý
ondrej at sury.org
Wed Mar 27 11:16:16 UTC 2013
The following commit has been merged in the master-experimental branch:
commit e33f83be7b5efddfd17a5e4cc3eecfcdae417b81
Author: Ondřej Surý <ondrej at sury.org>
Date: Thu Mar 21 17:19:47 2013 +0100
Make removing the contents of cache directory more robust
diff --git a/debian/postinst b/debian/postinst
index 9bb7c6d..5e21e63 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -204,20 +204,26 @@ for lInstance in $gInstances; do
fi
case "$1" in
configure|reconfigure)
+ if dpkg --compare-versions "$2" lt "2.3.0+dfsg1-3~"; then
+ rm -rf $fRailsCache
+ fi
# create directories
mkdir -p $fRailsLog
mkdir -p $fRailsVar
mkdir -p $fRailsVar/files
mkdir -p $fRailsCache
+ mkdir -p $fRailsCache/cache
mkdir -p $fRailsCache/plugin_assets
chmod 750 $fRailsLog
chmod 750 $fRailsVar
chmod 755 $fRailsCache
+ chmod 755 $fRailsCache/cache
chmod 755 $fRailsCache/plugin_assets
chown -f www-data:www-data $fRailsLog
chown -f www-data:www-data $fRailsVar
chown -f www-data:www-data $fRailsVar/files
chown -f www-data:www-data $fRailsCache
+ chown -f www-data:www-data $fRailsCache/cache
chown -f www-data:www-data $fRailsCache/plugin_assets
savedir="`pwd`"
cd /usr/share/redmine
@@ -280,10 +286,6 @@ This may take a while."
fi
echo "Clearing the cache directory for redmine instance \"${lInstance}\".
This may take a while."
- if dpkg --compare-versions "$2" lt "2.3.0+dfsg1-3~"; then
- rm -rf /var/cache/redmine/${lInstance}/*
- mkdir /var/cache/redmine/${lInstance}/cache
- fi
rake -s tmp:cache:clear RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" VERBOSE=$RAKE_VERBOSE || fCode=$?
if [ $fCode -ne 0 ]; then
echo "Error when clearing cache. You might need to clear the cache directory /var/cache/redmine/${lInstance}/ manually."
--
redmine.git
More information about the Pkg-ruby-extras-commits
mailing list