[DRE-commits] [diaspora] 04/08: always regenerate Gemfile.lock

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Jan 23 13:55:31 UTC 2017


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository diaspora.

commit 59e180a987e4310d72b9df5eef6ac4b9b2d68520
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Mon Jan 23 15:29:10 2017 +0530

    always regenerate Gemfile.lock
---
 debian/postinst | 33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/debian/postinst b/debian/postinst
index aba37f8..03f500f 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -26,13 +26,38 @@ set -e
 #     `abort-remove' or `abort-deconfigure'.
 
 
+#######################################################################
+# Read debian specific configuration
+#######################################################################
+. /etc/diaspora/diaspora-common.conf
+chown -R ${diaspora_user}: ${diaspora_home}
+cd ${diaspora_home}
+	
+#######################################################################
+# update Gemfile.lock, always
+#######################################################################
+su ${diaspora_user} -s /bin/sh -c 'truncate -s 0 ${diaspora_home}/Gemfile.lock'
+if ! su ${diaspora_user} -s /bin/sh -c 'bundle --local --quiet'; then
+  if [ "$1" = "triggered" ]; then
+    # probably triggered in the middle of an system upgrade; ignore failure
+    # but abort here
+    echo "#########################################################################"
+    echo "# Failed to detect gitlab dependencies; if you are in the middle of an #"
+    echo "# upgrade, this is probably fine, there will be another attempt later.  #"
+    echo "#                                                                       #"
+    echo "# If you are NOT in the middle of an upgrade, there is probably a real  #"
+    echo "# issue. Please report a bug.                                           #"
+    echo "#########################################################################"
+    exit 0
+  else
+    # something is really broken
+    exit 1
+  fi
+fi
+
 case "$1" in
     configure)
 
-	. /etc/diaspora/diaspora-common.conf
-	chown -R ${diaspora_user}: ${diaspora_home}
-	cd ${diaspora_home}
-	
 	echo "Setting up environment varibales..."
 	. /usr/lib/diaspora-common/scripts/set-env-diaspora.sh
 	echo RAILS_ENV=$RAILS_ENV DB=$DB ENVIRONMENT_URL=$ENVIRONMENT_URL

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/diaspora.git



More information about the Pkg-ruby-extras-commits mailing list