[med-svn] r13406 - trunk/packages/gnuhealth/trunk/debian
Emilien Klein
e2jk-guest at alioth.debian.org
Wed Apr 24 21:21:07 UTC 2013
Author: e2jk-guest
Date: 2013-04-24 21:21:07 +0000 (Wed, 24 Apr 2013)
New Revision: 13406
Added:
trunk/packages/gnuhealth/trunk/debian/templates
Modified:
trunk/packages/gnuhealth/trunk/debian/control
trunk/packages/gnuhealth/trunk/debian/postinst
Log:
Use debconf to prompt the user to manually update its database. Currently makes Lintian sad, discussion started on the ML.
Modified: trunk/packages/gnuhealth/trunk/debian/control
===================================================================
--- trunk/packages/gnuhealth/trunk/debian/control 2013-04-24 19:55:19 UTC (rev 13405)
+++ trunk/packages/gnuhealth/trunk/debian/control 2013-04-24 21:21:07 UTC (rev 13406)
@@ -15,6 +15,7 @@
Package: gnuhealth
Architecture: all
Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends},
+ debconf,
python-dateutil,
python-ldap,
python-lxml,
Modified: trunk/packages/gnuhealth/trunk/debian/postinst
===================================================================
--- trunk/packages/gnuhealth/trunk/debian/postinst 2013-04-24 19:55:19 UTC (rev 13405)
+++ trunk/packages/gnuhealth/trunk/debian/postinst 2013-04-24 21:21:07 UTC (rev 13406)
@@ -5,6 +5,9 @@
set -e
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
@@ -30,12 +33,13 @@
db=`psql -U postgres -l 2>/dev/null | grep gnuhealth | wc -l`
if [ $db -eq 1 ]; then
# Update the gnuhealth database
- echo "Updating the gnuhealth database"
trytond --database=gnuhealth --update=all
else
- echo "doesn't exist"
# The user has probably set up it's own database, prompt her
# to manually upgrade its database
+ db_reset gnuhealth/manualupgrade
+ db_input high gnuhealth/manualupgrade || true
+ db_go
fi
fi
# Start the Tryton server
Added: trunk/packages/gnuhealth/trunk/debian/templates
===================================================================
--- trunk/packages/gnuhealth/trunk/debian/templates (rev 0)
+++ trunk/packages/gnuhealth/trunk/debian/templates 2013-04-24 21:21:07 UTC (rev 13406)
@@ -0,0 +1,8 @@
+Template: gnuhealth/manualupgrade
+Type: note
+Description: Your GNU Health database needs to be manually updated
+ It looks like you are not using the default 'gnuhealth' database.
+ You will need to update your database manually by executing the following
+ command:
+ trytond --database=<your_database> --update=all
+
More information about the debian-med-commit
mailing list