[DRE-commits] [redmine] 02/02: debian/postinst: initialize variable

Antonio Terceiro terceiro at moszumanska.debian.org
Wed Apr 8 13:50:22 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 b843768a44a9fa6440457581a3babfb1d892b566
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Wed Apr 8 15:49:02 2015 +0200

    debian/postinst: initialize variable
---
 debian/changelog | 3 +++
 debian/postinst  | 1 +
 2 files changed, 4 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 699e972..6639077 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ redmine (3.0~20140825-6) UNRELEASED; urgency=medium
   * debian/postinst: run rake under `bundle exec` to correctly handle
     upgrades when the local admin installed non-packaged plugins (i.e. ~100%
     of them). Closes: #779273
+  * debian/postinst: initialize variable that will hold the return code of a
+    potentially failing command to 0 so it is not undefined if the command
+    suceeeds. Closes: #780894
 
  -- Antonio Terceiro <terceiro at debian.org>  Wed, 08 Apr 2015 12:06:32 +0200
 
diff --git a/debian/postinst b/debian/postinst
index 0630c7d..5aaa2c0 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -296,6 +296,7 @@ This may take a while."
 			fi
 			echo "Clearing the cache directory for redmine instance \"${lInstance}\".
 This may take a while."
+			fCode=0
 			bundle exec 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."

-- 
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