[DRE-commits] [diaspora-installer] 01/20: remove preinst db checking

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Mar 21 13:39:35 UTC 2016


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

praveen pushed a commit to branch master
in repository diaspora-installer.

commit 80767e22fc433f5bb82fa271b7ec1bb41cba1fff
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Mon Mar 21 14:47:30 2016 +0530

    remove preinst db checking
---
 debian/diaspora-common.preinst | 50 ------------------------------------------
 1 file changed, 50 deletions(-)

diff --git a/debian/diaspora-common.preinst b/debian/diaspora-common.preinst
deleted file mode 100755
index 4c10531..0000000
--- a/debian/diaspora-common.preinst
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /bin/sh
-set -e
-
-# Check if PostgreSQL database diaspora_production exist
-if su diaspora -s /bin/sh -c "psql  diaspora_production -c ''"
-then
-    echo "You already have a PostgreSQL database named 'diaspora_production'..."
-    export dbexist='true'
-fi
-
-case "$1" in
-    upgrade)
-        if ! test -z $dbexist
-        then
-            # Show current version of package
-            installed_diaspora_version=`echo $2|cut -d+ -f1`
-            installed_diaspora_major_version=`echo ${installed_diaspora_version} |cut -d. -f1,2`
-            if test $(echo "${installed_diaspora_major_version} < 0.5" |bc) -eq 1
-            then
-                echo "Updating from 0.4.x to 0.5.x needs long running migrations..."
-	        touch /tmp/flag_diaspora_db_migrations
-            fi
-        fi
-        ;;
-    install)
-        if ! test -z $dbexist
-        then
-            # new install should not see existing database
-            echo ""
-            echo "========================================================================="
-            echo "Aborting installation..."
-            echo "You may drop the database and try reinstalling"
-            echo "Command to drop the database: su postgres -c 'dropdb diaspora_production'"
-            echo "WARNING: This will remove all the data in diaspora_production database."
-            echo "========================================================================="
-            echo ""
-            exit 1
-        fi
-        ;;
-    abort-upgrade|install)
-        ;;
-    *)
-        echo "preinst called with unknown argument \`$1'" >&2
-        exit 1
-        ;;
-esac
-
-#DEBHELPER#
-
-exit 0

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



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