[evolvis-commits] r17561: backup commit: [#2021] DB upgrade

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Sep 20 12:03:08 CEST 2011


Author: mirabilos
Date: 2011-09-20 12:03:08 +0200 (Tue, 20 Sep 2011)
New Revision: 17561

Added:
   branches/ev48fixes/debian/evolvis.preinst
Modified:
   branches/ev48fixes/debian/evolvis.postinst
Log:
backup commit: [#2021] DB upgrade


Modified: branches/ev48fixes/debian/evolvis.postinst
===================================================================
--- branches/ev48fixes/debian/evolvis.postinst	2011-09-20 09:51:36 UTC (rev 17560)
+++ branches/ev48fixes/debian/evolvis.postinst	2011-09-20 10:03:08 UTC (rev 17561)
@@ -1,11 +1,29 @@
-#! /bin/sh
-#-
-# postinst script for evolvis
-#
-# see: dh_installdeb(1)
+#!/bin/sh
+# $Id$
+# $MirOS: contrib/hosted/tg/deb/jupp/debian/jupp.postinst,v 1.10 2011/09/06 20:07:39 tg Exp $
 
 set -e
 
+# This maintainer script can be called the following ways:
+#
+# * new-postinst "configure" [$most_recently_configured_version]
+# The package is unpacked; all dependencies are unpacked and, when there
+# are no circular dependencies, configured.
+#
+# * old-postinst "abort-upgrade" $new_version
+# * conflictors-postinst "abort-remove" "in-favour" $package
+#	$new_version
+# * postinst "abort-remove"
+# * deconfigureds-postinst "abort-deconfigure" "in-favour"
+#	$failed_install_package $fip_version ["removing"
+#	$conflicting_package $cp_version]
+# The package is unpacked; all dependencies are at least Half-Installed,
+# previously been configured, and not removed. In some error situations,
+# dependencies may not be even fully unpacked.
+#
+# * postinst "triggered" "${triggers[*]}"
+# For trigger-only calls, i.e. if "configure" is not called.
+
 enable_mwext() {
 	test -e /etc/mediawiki-extensions/extensions-available/"$1" || return 0
 	test -e /etc/mediawiki-extensions/extensions-enabled/"$1" && return
@@ -15,6 +33,13 @@
 
 case $1 in
 configure)
+	# potentially act on DB upgrade
+	if test -e /usr/share/gforge/evolvis-flag.36f3; then
+		# delete all users already marked as deleted
+		# to get the database into a consistent state
+…
+
+	# auto-enable some MediaWiki extensions
 	if which mwenext >/dev/null 2>&1; then
 		mkdir -p /etc/mediawiki-extensions/enabled-by-evolvis
 		enable_mwext Cite.php
@@ -41,8 +66,11 @@
 abort-upgrade|abort-remove|abort-deconfigure)
 	;;
 
+triggered)
+	;;
+
 *)
-	echo "postinst called with unknown argument '$1'" >&2
+	echo >&2 "postinst called with unknown subcommand '$1'"
 	exit 1
 	;;
 esac


Property changes on: branches/ev48fixes/debian/evolvis.postinst
___________________________________________________________________
Added: svn:keywords
   + Author CVSHeader Date Id LastChangedBy LastChangedDate LastChangedRevision Log Revision Source State

Added: branches/ev48fixes/debian/evolvis.preinst
===================================================================
--- branches/ev48fixes/debian/evolvis.preinst	                        (rev 0)
+++ branches/ev48fixes/debian/evolvis.preinst	2011-09-20 10:03:08 UTC (rev 17561)
@@ -0,0 +1,42 @@
+#!/bin/sh
+# $Id$
+# $MirOS: contrib/hosted/tg/deb/jupp/debian/jupp.preinst,v 1.3 2011/09/06 20:07:39 tg Exp $
+
+set -e
+
+# This maintainer script can be called the following ways:
+#
+# * new-preinst "install" [$old_version]
+# * new-preinst "upgrade" [$old_version]
+# * old-preinst "abort-upgrade" $new_version
+# Essential packages and Pre-Depends are available. Pre-Depends have
+# been configured once, but may be unpacked or Half-Configured only,
+# or, for "abort-upgrade", Half-Installed if their upgrade failed.
+
+case $1 in
+install)
+	;;
+
+upgrade)
+	# create flag for postinst to operate
+	if test -n "$2" && \
+	    dpkg --compare-versions "$2" lt '4.8.3+evolvis36+fixes3'; then
+		: >/usr/share/gforge/evolvis-flag.36f3
+	fi
+	;;
+
+abort-upgrade)
+	;;
+
+*)
+	echo >&2 "preinst called with unknown subcommand '$1'"
+	exit 1
+	;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0


Property changes on: branches/ev48fixes/debian/evolvis.preinst
___________________________________________________________________
Added: svn:keywords
   + Author CVSHeader Date Id LastChangedBy LastChangedDate LastChangedRevision Log Revision Source State



More information about the evolvis-commits mailing list