[DRE-commits] [redmine] 07/15: Fix handling of $2 when triggered
Antonio Terceiro
terceiro at moszumanska.debian.org
Sat May 2 21:00:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository redmine.
commit 2e9de38eed8ca2661e36b103b7d5b8be0721976d
Author: Antonio Terceiro <terceiro at debian.org>
Date: Thu Apr 9 11:47:49 2015 +0200
Fix handling of $2 when triggered
---
debian/changelog | 4 ++--
debian/postinst | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 0d7d60f..299e33f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,8 +19,8 @@ redmine (3.0~20140825-6) UNRELEASED; urgency=medium
- pass SCHEMA=/dev/null to rake `db:migrate` so it won't create
/usr/share/redmine/db/schema.rb
- debian/postrm: remove the aforementioned files
- * debian/postinst: restrict usage of $2 as a version number to actual
- upgrades.
+ * debian/postinst: restrict usage of $2 as a version number when triggered,
+ since $2 will contain the trigger names instead.
* debian/postinst: fix missing quotes around $fHasOldSessionName
* debian/install:
- install bin/ directory so rails detects redmine as a proper Rails app
diff --git a/debian/postinst b/debian/postinst
index 217b803..e5dd750 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -229,7 +229,7 @@ for lInstance in $gInstances; do
exit 0
fi
- if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt "2.3.0+dfsg1-3~"; then
+ if [ "$1" != triggered ] && dpkg --compare-versions "$2" lt "2.3.0+dfsg1-3~"; then
rm -rf $fRailsCache
fi
# create directories
@@ -264,7 +264,7 @@ for lInstance in $gInstances; do
#fi
# add secret key, set permissions, manage file with ucf
# trigger when session file doesn't exist or we are upgrading from previous version
- if [ ! -f "${fRailsEtc}/session.yml" ] || [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt "2.1.4+dfsg2-2~"; then
+ if [ ! -f "${fRailsEtc}/session.yml" ] || [ "$1" != triggered ] && dpkg --compare-versions "$2" lt "2.1.4+dfsg2-2~"; then
bundle exec rake -s generate_secret_token YML_SESSION_FILENAME="session.yml.new" RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" || true
chown -f root:www-data ${fRailsEtc}/session.yml.new
chmod 640 ${fRailsEtc}/session.yml.new
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/redmine.git
More information about the Pkg-ruby-extras-commits
mailing list