[Python-modules-commits] r7747 - in packages/libapache2-mod-python/trunk/debian (8 files)

pochu-guest at users.alioth.debian.org pochu-guest at users.alioth.debian.org
Tue Feb 24 23:40:37 UTC 2009


    Date: Tuesday, February 24, 2009 @ 23:40:36
  Author: pochu-guest
Revision: 7747

* Unconditionally enable the Apache module upon first install, instead
  of asking the user through debconf. Closes: #512755.
* Remove debconf templates and build magic because of the above change.

Modified:
  packages/libapache2-mod-python/trunk/debian/changelog
  packages/libapache2-mod-python/trunk/debian/control
  packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.postinst
  packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.postrm
  packages/libapache2-mod-python/trunk/debian/rules
Deleted:
  packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.config
  packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.templates
  packages/libapache2-mod-python/trunk/debian/po/

Modified: packages/libapache2-mod-python/trunk/debian/changelog
===================================================================
--- packages/libapache2-mod-python/trunk/debian/changelog	2009-02-24 22:09:06 UTC (rev 7746)
+++ packages/libapache2-mod-python/trunk/debian/changelog	2009-02-24 23:40:36 UTC (rev 7747)
@@ -1,3 +1,11 @@
+libapache2-mod-python (3.3.1-8) UNRELEASED; urgency=low
+
+  * Unconditionally enable the Apache module upon first install, instead
+    of asking the user through debconf. Closes: #512755.
+  * Remove debconf templates and build magic because of the above change.
+
+ -- Emilio Pozuelo Monfort <pochu at ubuntu.com>  Wed, 25 Feb 2009 00:14:59 +0100
+
 libapache2-mod-python (3.3.1-7) unstable; urgency=low
 
   [ Sandro Tosi ]

Modified: packages/libapache2-mod-python/trunk/debian/control
===================================================================
--- packages/libapache2-mod-python/trunk/debian/control	2009-02-24 22:09:06 UTC (rev 7746)
+++ packages/libapache2-mod-python/trunk/debian/control	2009-02-24 23:40:36 UTC (rev 7747)
@@ -3,8 +3,8 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Robert S. Edmonds <edmonds at debian.org>
-Build-Depends: debhelper (>= 5.0.38), debconf, autoconf, python-dev (>= 2.4.3-11),
- apache2-threaded-dev (>= 2.2.3-1), dpatch, python-central (>= 0.5.6), po-debconf
+Build-Depends: debhelper (>= 5.0.38), autoconf, python-dev (>= 2.4.3-11),
+ apache2-threaded-dev (>= 2.2.3-1), dpatch, python-central (>= 0.5.6)
 XS-Python-Version: current
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/libapache2-mod-python/trunk/
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/libapache2-mod-python/trunk/
@@ -13,7 +13,7 @@
  
 Package: libapache2-mod-python
 Architecture: any
-Depends: ${misc:Depends}, ${python:Depends}, debconf | debconf-2.0, ${shlibs:Depends}, apache2.2-common, apache2
+Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}, apache2.2-common, apache2
 Suggests: libapache2-mod-python-doc
 Provides: ${python:Provides}, libapache2-mod-python${python:Versions}
 Replaces: libapache2-mod-python2.4 (<< 3.2.8-3), libapache2-mod-python2.3 (<< 3.2.8-3)

Deleted: packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.config
===================================================================
--- packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.config	2009-02-24 22:09:06 UTC (rev 7746)
+++ packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.config	2009-02-24 23:40:36 UTC (rev 7747)
@@ -1,19 +0,0 @@
-#!/bin/sh -e
-
-# Source debconf library
-. /usr/share/debconf/confmodule
-
-if [ -e /etc/apache2/mods-enabled/python.load ]; then
-    db_set libapache2-mod-python/enable_module true
-else
-    # We want to enable the module by default during initial configuration
-    if [ "$1" = "configure" ] ; then
-        db_set libapache2-mod-python/enable_module true
-    else
-        db_set libapache2-mod-python/enable_module false
-    fi
-fi
-
-# Enable the Apache 2 module?
-db_input medium libapache2-mod-python/enable_module || true
-db_go

Modified: packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.postinst
===================================================================
--- packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.postinst	2009-02-24 22:09:06 UTC (rev 7746)
+++ packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.postinst	2009-02-24 23:40:36 UTC (rev 7747)
@@ -1,24 +1,52 @@
 #!/bin/sh
-
 set -e
 
-# Source debconf library
-. /usr/share/debconf/confmodule
+#DEBHELPER#
 
-# mod_python.load renamed to python.load in 3.3.1-3
-test -L /etc/apache2/mods-enabled/mod_python.load && rm -f /etc/apache2/mods-enabled/mod_python.load
-test -e /etc/apache2/mods-available/mod_python.load && rm -f /etc/apache2/mods-available/mod_python.load
+OLDENABLED=/etc/apache2/mods-enabled/mod_python.load
+OLDAVAILABLE=/etc/apache2/mods-available/mod_python.load
 
+# Before 3.3.1-3, the module had a different name, so if we are upgrading
+# from such an old package, re-enable the module if it was enabled
+if dpkg-compare-versions "$2" lt-nl "3.3.1-3"; then
+	test -L $OLDENABLED && rm -f $OLDENABLED && a2enmod python >/dev/null || true
+	test -e $OLDAVAILABLE && rm -f $OLDAVAILABLE
+fi
+
+
+reload_apache()
+{
+	if apache2ctl configtest 2>/dev/null; then
+		if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+			invoke-rc.d apache2 force-reload || exit $?
+		else
+			/etc/init.d/apache2 force-reload || exit $?
+		fi
+	else
+		echo "Your apache2 configuration is broken, so we're not restarting it for you."
+	fi
+}
+
 PYTHON_LOAD=/etc/apache2/mods-enabled/python.load
-if [ "$1" = "configure" -o "$1" = "reconfigure" ]; then
-    db_get libapache2-mod-python/enable_module
-    if [ "$RET" = "true" ]; then
-        test ! -e $PYTHON_LOAD -o -L $PYTHON_LOAD && ln -sf ../mods-available/python.load $PYTHON_LOAD
-    else
-        test -L $PYTHON_LOAD && rm -f $PYTHON_LOAD
-    fi
+
+# Inspired in libapache2-mod-php5.postinst
+
+if [ "$1" = "configure" -a -n "$2" ]; then
+	# Upgrading from a previous version. Only restart apache
+	# if the python mod is enabled
+	if [ -e $PYTHON_LOAD ]; then
+		reload_apache
+	fi
+	exit 0
 fi
 
-#DEBHELPER#
 
+if [ "$1" = "configure" ]; then
+	# Not upgrading from a previous version, enable the module
+	if [ -e /etc/apache2/apache2.conf ]; then
+		a2enmod python >/dev/null || true
+		reload_apache
+	fi
+fi
+
 exit 0

Modified: packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.postrm
===================================================================
--- packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.postrm	2009-02-24 22:09:06 UTC (rev 7746)
+++ packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.postrm	2009-02-24 23:40:36 UTC (rev 7747)
@@ -3,9 +3,7 @@
 set -e
 
 if [ "$1" = "remove" -o "$1" = "purge" ]; then
-    if [ -L /etc/apache2/mods-enabled/python.load ]; then
-        rm -f /etc/apache2/mods-enabled/python.load
-    fi
+    a2dismod python
 fi
 
 # mod_python.load renamed to python.load in 3.3.1-3

Deleted: packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.templates
===================================================================
--- packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.templates	2009-02-24 22:09:06 UTC (rev 7746)
+++ packages/libapache2-mod-python/trunk/debian/libapache2-mod-python.templates	2009-02-24 23:40:36 UTC (rev 7747)
@@ -1,20 +0,0 @@
-# These templates have been reviewed by the debian-l10n-english
-# team
-#
-# If modifications/additions/rewording are needed, please ask
-# debian-l10n-english at lists.debian.org for advice.
-#
-# Even minor modifications require translation updates and such
-# changes should be coordinated with translators and reviewers.
-
-Template: libapache2-mod-python/enable_module
-Type: boolean
-_Description: Enable the Apache 2 mod_python module?
- The mod_python module must be enabled if hosted web sites are using
- its features.
- .
- If you choose this option, a symbolic link for mod_python will be created
- in /etc/apache2/mods_enabled/. If you refuse this option, this link
- will be removed if it exists.
- .
- Apache 2 must be restarted manually after changing this option.

Modified: packages/libapache2-mod-python/trunk/debian/rules
===================================================================
--- packages/libapache2-mod-python/trunk/debian/rules	2009-02-24 22:09:06 UTC (rev 7746)
+++ packages/libapache2-mod-python/trunk/debian/rules	2009-02-24 23:40:36 UTC (rev 7747)
@@ -39,8 +39,6 @@
 	[ ! -f Makefile ] || $(MAKE) distclean
 	rm -f config.log configure src/include/mod_python.h
 
-	debconf-updatepo
-
 	dh_clean
 
 install: build
@@ -68,7 +66,6 @@
 binary-indep: build install
 	dh_testdir -i
 	dh_testroot -i
-	dh_installdebconf -i	
 	dh_installdocs -i
 	dh_installexamples -i
 	dh_installmenu -i
@@ -87,7 +84,6 @@
 	dh_testdir -a
 	dh_testroot -a
 	dh_pycentral -plibapache2-mod-python
-	dh_installdebconf -a	
 	dh_installdocs -a
 	dh_installexamples -a
 	dh_installmenu -a




More information about the Python-modules-commits mailing list