[med-svn] r6663 - trunk/packages/biomaj/trunk/debian
olivier sallou
osallou-guest at alioth.debian.org
Wed Apr 27 07:31:04 UTC 2011
Author: osallou-guest
Date: 2011-04-27 07:30:58 +0000 (Wed, 27 Apr 2011)
New Revision: 6663
Added:
trunk/packages/biomaj/trunk/debian/preinst
Modified:
trunk/packages/biomaj/trunk/debian/changelog
trunk/packages/biomaj/trunk/debian/postinst
trunk/packages/biomaj/trunk/debian/postrm
trunk/packages/biomaj/trunk/debian/prerm
Log:
fix bug 624284
Modified: trunk/packages/biomaj/trunk/debian/changelog
===================================================================
--- trunk/packages/biomaj/trunk/debian/changelog 2011-04-27 07:17:57 UTC (rev 6662)
+++ trunk/packages/biomaj/trunk/debian/changelog 2011-04-27 07:30:58 UTC (rev 6663)
@@ -6,6 +6,10 @@
* debian/patches/fix623558_remove_pid:
Remove unnecessary pid file creation
Closes: #623558
+ * debian/postrm,debian/preinst:
+ Issue for smooth upgrade, require old package
+ removal then new package install
+ Closes: #624284
-- Olivier Sallou <olivier.sallou at irisa.fr> Fri, 22 Apr 2011 16:27:11 +0200
Modified: trunk/packages/biomaj/trunk/debian/postinst
===================================================================
--- trunk/packages/biomaj/trunk/debian/postinst 2011-04-27 07:17:57 UTC (rev 6662)
+++ trunk/packages/biomaj/trunk/debian/postinst 2011-04-27 07:30:58 UTC (rev 6663)
@@ -7,35 +7,33 @@
case "$1" in
configure)
+ ant_home="/usr/share/ant"
+ biomaj_root="/usr/share/biomaj"
-ant_home="/usr/share/ant"
-biomaj_root="/usr/share/biomaj"
+ db_get biomaj/jdk_home
+ jdk_home="$RET"
+ db_type="MySQL"
+ db_get biomaj/mysql_host
+ db_url="jdbc:mysql://$RET/biomaj_log"
+ db_get biomaj/mysql_login
+ db_login="$RET"
+ db_get biomaj/mysql_passwd
+ db_passwd="$RET"
-db_get biomaj/jdk_home
-jdk_home="$RET"
-db_type="MySQL"
-db_get biomaj/mysql_host
-db_url="jdbc:mysql://$RET/biomaj_log"
-db_get biomaj/mysql_login
-db_login="$RET"
-db_get biomaj/mysql_passwd
-db_passwd="$RET"
+ tomcat_port="0"
-tomcat_port="0"
+ cd $biomaj_root
+ ln -s /etc/biomaj/general.conf general.conf
-# Link general.conf
-cd $biomaj_root
-ln -s /etc/biomaj/general.conf general.conf
+ javac -d $biomaj_root/bin $biomaj_root/bin/Configurator.java
-javac -d $biomaj_root/bin $biomaj_root/bin/Configurator.java
+ java -cp $biomaj_root/bin Configurator java_home:=$jdk_home ant_home:=$ant_home biomaj_root:=$biomaj_root use_ldap:=$use_ldap ldap_host:=$ldap_host ldap_dn:=$ldap_dn opt_filter:=$opt_filter db_type:=$db_type db_url:=$db_url db_login:=$db_login db_passwd:=$db_passwd app_login:=$app_login app_passwd:=$app_passwd tomcat_port:=$tomcat_port
-java -cp $biomaj_root/bin Configurator java_home:=$jdk_home ant_home:=$ant_home biomaj_root:=$biomaj_root use_ldap:=$use_ldap ldap_host:=$ldap_host ldap_dn:=$ldap_dn opt_filter:=$opt_filter db_type:=$db_type db_url:=$db_url db_login:=$db_login db_passwd:=$db_passwd app_login:=$app_login app_passwd:=$app_passwd tomcat_port:=$tomcat_port
-
-if [ $db_type = "MySQL" ]; then
+ if [ $db_type = "MySQL" ]; then
echo "Installation Complete."
echo "You now need to create the biomaj_log database on your MySQL server."
echo "The creation script is provided at /usr/share/biomaj/sql/mysql.sql."
-fi
+ fi
;;
Modified: trunk/packages/biomaj/trunk/debian/postrm
===================================================================
--- trunk/packages/biomaj/trunk/debian/postrm 2011-04-27 07:17:57 UTC (rev 6662)
+++ trunk/packages/biomaj/trunk/debian/postrm 2011-04-27 07:30:58 UTC (rev 6663)
@@ -6,14 +6,22 @@
. /usr/share/debconf/confmodule
case "$1" in
- purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ purge)
# Remove all
if [ -e /usr/share/biomaj ]; then
rm -rf /usr/share/biomaj
fi
echo "Warning, BioMAJ database for MySQL is not deleted by process removal."
;;
-
+ remove|upgrade|failed-upgrade|abort-install|disappear)
+ echo "Warning, BioMAJ database for MySQL is not deleted by process removal." ;;
+ abort-upgrade)
+ # Fix for bug 624284
+ if [ $2 = "1.1.0-1" ]; then
+ echo "Package needs to be reinstalled due to an upgrade error"
+ exit 1
+ fi
+ ;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
Added: trunk/packages/biomaj/trunk/debian/preinst
===================================================================
--- trunk/packages/biomaj/trunk/debian/preinst (rev 0)
+++ trunk/packages/biomaj/trunk/debian/preinst 2011-04-27 07:30:58 UTC (rev 6663)
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+case "$1" in
+ install)
+ ;;
+ upgrade)
+ if [ $2 = "1.1.0-1" ]; then
+ echo "There is an issue in version 1.1.0-1, you need to first remove the package, then to install it. There is no impact on data."
+ exit 1
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+
+#DEBHELPER#
+
Modified: trunk/packages/biomaj/trunk/debian/prerm
===================================================================
--- trunk/packages/biomaj/trunk/debian/prerm 2011-04-27 07:17:57 UTC (rev 6662)
+++ trunk/packages/biomaj/trunk/debian/prerm 2011-04-27 07:30:58 UTC (rev 6663)
@@ -7,46 +7,27 @@
case "$1" in
- remove|upgrade|deconfigure)
-# Remove post installation created files
-
-# Remove admin credentials
-if [ -e /usr/share/biomaj/.bmajwatcherpasswd ]; then
- rm /usr/share/biomaj/.bmajwatcherpasswd
-fi
-# Remove biomaj.jar
-if [ -e /usr/share/biomaj/lib/biomaj.jar ]; then
- rm /usr/share/biomaj/lib/biomaj.jar
-fi
-# Remove build content
-if [ -e /usr/share/biomaj/build ]; then
- rm -rf /usr/share/biomaj/build
-fi
-# hsql server startup log
-if [ -e /usr/share/biomaj/dbserver.log ]; then
- rm /usr/share/biomaj/dbserver.log
-fi
-# distribution directory
-if [ -e /usr/share/biomaj/dist ]; then
- rm -rf /usr/share/biomaj/dist
-fi
-# Installation logs
-if [ -e /usr/share/biomaj/install_log.log ]; then
- rm /usr/share/biomaj/install_log.log
-fi
-# Internal tmp directory
-if [ -e /usr/share/biomaj/tmp ]; then
- rm -rf /usr/share/biomaj/tmp
-fi
-# Link to general.conf
-if [ -L /usr/share/biomaj/general.conf ]; then
+ upgrade)
+ # Link to general.conf
+ if [ -L /usr/share/biomaj/general.conf ]; then
rm /usr/share/biomaj/general.conf
-fi
-# Link to biomaj.jar
-if [ -L /usr/share/biomaj/apache-tomcat-6.0.24/lib/biomaj.jar ]; then
- rm /usr/share/biomaj/apache-tomcat-6.0.24/lib/biomaj.jar
-fi
+ fi
+ ;;
+ remove|deconfigure)
+ # Remove post installation created files
+ # Remove admin credentials
+ if [ -e /usr/share/biomaj/.bmajwatcherpasswd ]; then
+ rm /usr/share/biomaj/.bmajwatcherpasswd
+ fi
+ # Installation logs
+ if [ -e /usr/share/biomaj/install_log.log ]; then
+ rm /usr/share/biomaj/install_log.log
+ fi
+ # Link to general.conf
+ if [ -L /usr/share/biomaj/general.conf ]; then
+ rm /usr/share/biomaj/general.conf
+ fi
;;
failed-upgrade)
More information about the debian-med-commit
mailing list