[Python-modules-commits] r6003 - in packages/mod-wsgi/trunk/debian (5 files)

bzed at users.alioth.debian.org bzed at users.alioth.debian.org
Sun Jul 20 21:13:32 UTC 2008


    Date: Sunday, July 20, 2008 @ 21:13:30
  Author: bzed
Revision: 6003

* Calling pyversions in postinst requires that 'python' is installed *and*
  configured, so it would need to be added to Pre-Depends. As this is kinda
  ugly, we ship the symlink to the module for the right Python version now
  in the package. I assume that this will really fix #483197 now, I'm quite
  sure that the broken link results from an error message of the
  unconfigured python/pyversions. Shipping the symlink also makes sure that
  it is available while Apache is configured (which may happen before
  mod-wsgi is configured). (Closes: #483197, #491478)
* Drop the parts from the maintainer scripts which renamed the wsgi config
  files (see #456737 for details) - as mod-wsgi was not released with Etch
  and the fix was for a long enough time in testing, it should be safe to
  remove them before Lenny.

Modified:
  packages/mod-wsgi/trunk/debian/changelog
  packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postinst
  packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postrm
  packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.prerm
  packages/mod-wsgi/trunk/debian/rules

Modified: packages/mod-wsgi/trunk/debian/changelog
===================================================================
--- packages/mod-wsgi/trunk/debian/changelog	2008-07-19 13:05:55 UTC (rev 6002)
+++ packages/mod-wsgi/trunk/debian/changelog	2008-07-20 21:13:30 UTC (rev 6003)
@@ -1,3 +1,20 @@
+mod-wsgi (2.1-2) UNRELEASED; urgency=medium
+
+  * Calling pyversions in postinst requires that 'python' is installed *and*
+    configured, so it would need to be added to Pre-Depends. As this is kinda
+    ugly, we ship the symlink to the module for the right Python version now
+    in the package. I assume that this will really fix #483197 now, I'm quite
+    sure that the broken link results from an error message of the
+    unconfigured python/pyversions. Shipping the symlink also makes sure that
+    it is available while Apache is configured (which may happen before
+    mod-wsgi is configured). (Closes: #483197, #491478)
+  * Drop the parts from the maintainer scripts which renamed the wsgi config
+    files (see #456737 for details) - as mod-wsgi was not released with Etch
+    and the fix was for a long enough time in testing, it should be safe to
+    remove them before Lenny.
+
+ -- Bernd Zeimetz <bzed at debian.org>  Sun, 20 Jul 2008 23:09:41 +0200
+
 mod-wsgi (2.1-1) unstable; urgency=low
 
   * New upstream release.

Modified: packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postinst
===================================================================
--- packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postinst	2008-07-19 13:05:55 UTC (rev 6002)
+++ packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postinst	2008-07-20 21:13:30 UTC (rev 6003)
@@ -2,11 +2,6 @@
 
 set -e
 
-/usr/share/python/runtime.d/libapache2-mod-wsgi.rtupdate \
-        rtupdate \
-        pouet \
-        $(pyversions -d)
-
 apache_force_reload() {
     if apache2ctl configtest 2>/dev/null; then
         invoke-rc.d apache2 force-reload || true
@@ -15,19 +10,6 @@
     fi
 }
 
-# mod-wsgi.{load,conf} renamed to wsgi.{load,conf} in 1.3-2 / 2.0~c4-2:
-# remove old mod-wsgi.* files
-test -e /etc/apache2/mods-available/mod-wsgi.load && rm -f /etc/apache2/mods-available/mod-wsgi.load
-test -L /etc/apache2/mods-enabled/mod-wsgi.conf && rm -f /etc/apache2/mods-enabled/mod-wsgi.conf
-# use old config file if possible
-test -e /etc/apache2/mods-available/mod-wsgi.conf && mv -f /etc/apache2/mods-available/mod-wsgi.conf \
-	/etc/apache2/mods-available/wsgi.conf
-# enable wsgi module if mod-wsgi was enabled
-if [ -L /etc/apache2/mods-enabled/mod-wsgi.load ]; then
-	rm -f /etc/apache2/mods-enabled/mod-wsgi.load
-        a2enmod wsgi >/dev/null || true
-fi
-
 if [ -z "$2" ]; then
     if [ -e /etc/apache2/apache2.conf ]; then
         a2enmod wsgi >/dev/null || true

Modified: packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postrm
===================================================================
--- packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postrm	2008-07-19 13:05:55 UTC (rev 6002)
+++ packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.postrm	2008-07-20 21:13:30 UTC (rev 6003)
@@ -1,27 +1,5 @@
 #! /bin/sh
 
-# mod-wsgi.{load,conf} renamed to wsgi.{load,conf} in 1.3-2 / 2.0~c4-2
-version_with_old_module_name() {
-    dpkg --compare-versions "$1" lt-nl "1.3-2" && return 0
-    dpkg --compare-versions "$1" lt-nl "2.0~c4-2" && dpkg --compare-versions "$1" gt-nl "2.0~c1" && return 0
-    return 1
-}
-restore_mod_wsgi() {
-    a2dismod wsgi || true
-    # downgrading to package with old module name -- we have to restore pseudo conffile
-    echo "LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so" > /etc/apache2/mods-available/mod-wsgi.load
-    if [ -e /etc/apache2/mods-available/wsgi.conf ]; then
-        mv /etc/apache2/mods-available/wsgi.conf /etc/apache2/mods-available/mod-wsgi.conf
-    fi
-    if [ -e /etc/apache2/mods-available/wsgi.load ]; then
-        rm -f /etc/apache2/mods-available/wsgi.load
-    fi
-}
-if version_with_old_module_name $2; then
-    test ! -e /etc/apache2/mods-available/mod-wsgi.load && restore_mod_wsgi
-fi
-
-
 if [ "$1" = "purge" -o "$1" = "remove" ]; then
     # remove pseudo conffile
     test -e /etc/apache2/mods-available/wsgi.load && rm -f /etc/apache2/mods-available/wsgi.load

Modified: packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.prerm
===================================================================
--- packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.prerm	2008-07-19 13:05:55 UTC (rev 6002)
+++ packages/mod-wsgi/trunk/debian/libapache2-mod-wsgi.prerm	2008-07-20 21:13:30 UTC (rev 6003)
@@ -6,8 +6,6 @@
     a2dismod wsgi || true
 fi
 
-rm -f /usr/lib/apache2/modules/mod_wsgi.so
-
 #DEBHELPER#
 
 exit 0

Modified: packages/mod-wsgi/trunk/debian/rules
===================================================================
--- packages/mod-wsgi/trunk/debian/rules	2008-07-19 13:05:55 UTC (rev 6002)
+++ packages/mod-wsgi/trunk/debian/rules	2008-07-20 21:13:30 UTC (rev 6003)
@@ -11,6 +11,7 @@
 
 APXS2=/usr/bin/apxs2
 PYVERS=$(shell pyversions -vs)
+PYDEFAULT=$(shell pyversions -dv)
 PYMIN=$(shell echo $(PYVERS) | awk '{print $$1}')
 PYMAX=$(shell echo $(PYVERS) | LANG=C awk '{print $$NF+0.1}')
 
@@ -60,7 +61,7 @@
 	install -d -m 755 debian/$(PACKAGE)/usr/share/python/runtime.d
 	install -m 755 debian/*.rtupdate debian/$(PACKAGE)/usr/share/python/runtime.d/
 	dh_installman
-	dh_link
+	dh_link usr/lib/apache2/modules/mod_wsgi.so-$(PYDEFAULT) usr/lib/apache2/modules/mod_wsgi.so
 	dh_strip
 	dh_compress
 	dh_fixperms




More information about the Python-modules-commits mailing list