[evolvis-commits] r18480: enable the MW extensions before running the MW DB upgrade

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Jul 12 11:13:56 CEST 2012


Author: mirabilos
Date: 2012-07-12 11:13:55 +0200 (Thu, 12 Jul 2012)
New Revision: 18480

Removed:
   trunk/gforge_base/evolvisforge-5.1/src/debian/evolvis.prerm
Modified:
   trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
   trunk/gforge_base/evolvisforge-5.1/src/debian/evolvis.postinst
   trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.postinst
   trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.prerm
Log:
enable the MW extensions before running the MW DB upgrade

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-07-12 09:13:52 UTC (rev 18479)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-07-12 09:13:55 UTC (rev 18480)
@@ -2,8 +2,11 @@
 
   * Let normalise_roles do the maven user re-insertion dance
     (again, this is necessary on *one* system we run only… why?)
+  * Move the MW plugin enable/disable code from the metapackage
+    to the MW plugin, so they are enabled at the point in time
+    where MW DB upgrade scripts are run
 
- -- Thorsten Glaser <t.glaser at tarent.de>  Thu, 12 Jul 2012 10:47:58 +0200
+ -- Thorsten Glaser <t.glaser at tarent.de>  Thu, 12 Jul 2012 11:10:48 +0200
 
 fusionforge (1:5.1.1+evolvis64) unstable; urgency=low
 

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/evolvis.postinst
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/evolvis.postinst	2012-07-12 09:13:52 UTC (rev 18479)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/evolvis.postinst	2012-07-12 09:13:55 UTC (rev 18480)
@@ -6,37 +6,8 @@
 
 set -e
 
-enable_mwext() {
-	test -e /etc/mediawiki-extensions/extensions-available/"$1" || return 0
-	test -e /etc/mediawiki-extensions/extensions-enabled/"$1" && return
-	: >/etc/mediawiki-extensions/enabled-by-evolvis/"$1"
-	mwenext "$1"
-}
-
 case $1 in
 configure)
-	if which mwenext >/dev/null 2>&1; then
-		mkdir -p /etc/mediawiki-extensions/enabled-by-evolvis
-		enable_mwext Cite.php
-		enable_mwext Collection.php
-		enable_mwext CreateBox.php
-		enable_mwext Footnote.php
-		enable_mwext Graphviz.php
-		enable_mwext ImageMap.php
-		enable_mwext InputBox.php
-		enable_mwext Interwiki.php
-		enable_mwext LanguageSelector.php
-		enable_mwext NewestPages.php
-		enable_mwext News.php
-		enable_mwext PageCSS.php
-		enable_mwext ParserFunctions.php
-		enable_mwext Polyglot.php
-		enable_mwext RSSReader.php
-		enable_mwext SpecialCite.php
-		enable_mwext SpecialInterwiki.php
-		enable_mwext SyntaxHighlight_GeSHi.php
-	fi
-
 	if test -z "$2" || \
 	    dpkg --compare-versions "$2" lt 1:5.1.1+evolvis63; then
 		# fresh installation or upgrade from <= evolvis 63

Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.postinst
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.postinst	2012-07-12 09:13:52 UTC (rev 18479)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.postinst	2012-07-12 09:13:55 UTC (rev 18480)
@@ -3,6 +3,13 @@
 
 set -e
 
+enable_mwext() {
+	test -e /etc/mediawiki-extensions/extensions-available/"$1" || return 0
+	test -e /etc/mediawiki-extensions/extensions-enabled/"$1" && return
+	: >/etc/mediawiki-extensions/enabled-by-evolvis/"$1"
+	mwenext "$1"
+}
+
 upgrade_mediawikis () {
     # Upgrade Mediawiki database schemas
     /usr/share/gforge/bin/list-projects-using-plugin.php mediawiki | while read i ; do
@@ -24,6 +31,29 @@
 		/usr/share/@OLDPACKAGE@/plugins/@PLUGSHORTNAME@/bin/db-upgrade.pl
 	fi
 	/usr/share/@OLDPACKAGE@/bin/register-plugin $(echo @PLUGSHORTNAME@ | sed 's/-//g') "@PLUGLONGNAME@"
+
+	if which mwenext >/dev/null 2>&1; then
+		mkdir -p /etc/mediawiki-extensions/enabled-by-evolvis
+		enable_mwext Cite.php
+		enable_mwext Collection.php
+		enable_mwext CreateBox.php
+		enable_mwext Footnote.php
+		enable_mwext Graphviz.php
+		enable_mwext ImageMap.php
+		enable_mwext InputBox.php
+		enable_mwext Interwiki.php
+		enable_mwext LanguageSelector.php
+		enable_mwext NewestPages.php
+		enable_mwext News.php
+		enable_mwext PageCSS.php
+		enable_mwext ParserFunctions.php
+		enable_mwext Polyglot.php
+		enable_mwext RSSReader.php
+		enable_mwext SpecialCite.php
+		enable_mwext SpecialInterwiki.php
+		enable_mwext SyntaxHighlight_GeSHi.php
+	fi
+
 	upgrade_mediawikis
 	;;
     

Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.prerm
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.prerm	2012-07-12 09:13:52 UTC (rev 18479)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/mediawiki/debian/plugin-mediawiki.prerm	2012-07-12 09:13:55 UTC (rev 18480)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# prerm script for @OLDPACKAGE at -plugin-@PLUGSHORTNAME@
+# prerm script for @PACKAGE at -plugin-mediawiki
 #
 # see: dh_installdeb(1)
 
@@ -16,9 +16,22 @@
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
+disable_mwext() {
+	test -e /etc/mediawiki-extensions/extensions-enabled/"$1" || return 0
+	mwdisext "$1"
+}
 
 case "$1" in
     remove|deconfigure)
+	if which mwdisext >/dev/null 2>&1 && \
+	    test -d /etc/mediawiki-extensions/enabled-by-evolvis/.; then
+		(cd /etc/mediawiki-extensions/enabled-by-evolvis
+		for extension in *; do
+			disable_mwext "$extension"
+		done)
+		rm -rf /etc/mediawiki-extensions/enabled-by-evolvis
+	fi
+
 	if [ -f /var/run/postgresql/.s.PGSQL.5432 ]
 	then
 		/usr/share/@OLDPACKAGE@/bin/unregister-plugin @PLUGSHORTNAME@
@@ -42,5 +55,3 @@
 #DEBHELPER#
 
 exit 0
-
-



More information about the evolvis-commits mailing list