[DRE-commits] [diaspora-installer] 18/20: remove all pre depends
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Mon Mar 21 13:39:37 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 5bd5aa8a954df70af40b573e70bee8dae6364f1a
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Mon Mar 21 18:28:40 2016 +0530
remove all pre depends
---
debian/control | 9 ++++-----
debian/preinst | 47 +++++------------------------------------------
2 files changed, 9 insertions(+), 47 deletions(-)
diff --git a/debian/control b/debian/control
index 4ef46b1..51ab6ac 100644
--- a/debian/control
+++ b/debian/control
@@ -16,8 +16,8 @@ Package: diaspora-installer
Architecture: all
Section: contrib/ruby
XB-Ruby-Versions: ${ruby:Versions}
-Pre-Depends: diaspora-common (= ${source:Version})
-Depends: build-essential,
+Depends: diaspora-common (= ${source:Version}),
+ build-essential,
ghostscript,
imagemagick,
libcurl4-openssl-dev,
@@ -57,8 +57,8 @@ Package: diaspora-installer-mysql
Architecture: all
Section: contrib/ruby
XB-Ruby-Versions: ${ruby:Versions}
-Pre-Depends: mysql-server
-Depends: diaspora-installer,
+Depends: mysql-server,
+ diaspora-installer,
dbconfig-mysql,
libmysqlclient-dev,
${misc:Depends},
@@ -85,7 +85,6 @@ Description: distributed social networking service - installer (with mysql)
Package: diaspora-common
Architecture: all
XB-Ruby-Versions: ${ruby:Versions}
-Pre-Depends: bc
Depends: adduser,
dbconfig-pgsql | dbconfig-mysql | dbconfig-no-thanks,
postgresql | mysql-server,
diff --git a/debian/preinst b/debian/preinst
index 0c255bb..96810a8 100755
--- a/debian/preinst
+++ b/debian/preinst
@@ -1,9 +1,7 @@
#! /bin/sh
set -e
-# Read variables
-. /etc/diaspora/diaspora-common.conf
-. ${diaspora_conf}
+diaspora_home=/usr/share/diaspora
# Fix bin symlink set by earlier versions
if test -L ${diaspora_home}/bin
@@ -11,13 +9,6 @@ then
rm -rf ${diaspora_home}/bin
fi
-# 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
-
# Backup the previous version
# Just keep the config and vendor/bundle
backup() {
@@ -36,38 +27,10 @@ backup() {
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`
- installed_diaspora_minor_version=`echo ${installed_diaspora_version} |cut -d. -f3,4`
- diaspora_minor_version=`echo ${diaspora_version} |cut -d. -f3,4`
- if test $(echo "${installed_diaspora_major_version} < 0.5" |bc) -eq 1
- then
- echo "Stopping diaspora..."
- invoke-rc.d diaspora stop
- cd ${diaspora_home}
- . ${diaspora_conf}
- echo "Run bundle install..."
- su diaspora -s /bin/sh -c 'bundle install'
- echo "Run sidekiq for 5 minutes..."
- echo "Current time is `date`..."
- su diaspora -s /bin/sh -c 'bundle exec sidekiq&'
- sleep 5m
- echo "Stop sidekiq..."
- su diaspora -s /bin/sh -c 'pkill -u diaspora -f sidekiq' || true
- echo "Making a backup of ${diaspora_home}..."
- backup || true
- elif test $(echo "${installed_diaspora_minor_version} < ${diaspora_minor_version}" |bc) -eq 1
- then
- echo "Stopping diaspora..."
- invoke-rc.d diaspora stop
- echo "Making a backup of ${diaspora_home}..."
- backup || true
- fi
-
- fi
+ echo "Stopping diaspora..."
+ invoke-rc.d diaspora stop
+ echo "Making a backup of ${diaspora_home}..."
+ backup || true
;;
abort-upgrade|install)
;;
--
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