[Pkg-apache-commits] [SCM] Debian packaging for apache2 (Apache HTTPD 2.x) branch, next, updated. af9140ae0181f3ff72d886fdb1226b47e7c884c9
Arno Töll
debian at toell.net
Tue Mar 27 17:51:45 UTC 2012
The following commit has been merged in the next branch:
commit af9140ae0181f3ff72d886fdb1226b47e7c884c9
Author: Arno Töll <debian at toell.net>
Date: Tue Mar 27 19:50:35 2012 +0200
Do not try to remove 2.2 maintainer scripts if we're not upgrading. Plus omit
ugly warnings for fresh installations
diff --git a/debian/apache2.postinst b/debian/apache2.postinst
index 0dce8a1..94da896 100644
--- a/debian/apache2.postinst
+++ b/debian/apache2.postinst
@@ -54,6 +54,7 @@ SQUEEZE_UPGRADE=0
we_are_upgrading_from_squeeze()
{
if [ -n "$2" ] && dpkg --compare-versions "$2" le-nl "2.3"; then
+ SQUEEZE_UPGRADE=1
return 0
fi
@@ -64,6 +65,7 @@ we_are_upgrading_from_squeeze()
fi
if [ -e /etc/apache2/.apache2_mpm_selected ] ; then
+ SQUEEZE_UPGRADE=1
return 0
fi
@@ -380,8 +382,8 @@ esac
# And now the traditional insanity of apache2 upgrades (see #390823):
# If everything went well, we need to purge apache2.2-common's postrm, or
# purging that package will remove our logs, caches, ...
-if [ "$1" = configure ] ; then
- oldpostrm=$(dpkg-query -c apache2.2-common postrm||true)
+if [ "$1" = configure ] && we_are_upgrading_from_squeeze $@ ; then
+ oldpostrm=$(dpkg-query -c apache2.2-common postrm 2>/dev/null || true)
if [ -n "$oldpostrm" ] ; then
rm -f "$oldpostrm"
fi
diff --git a/debian/changelog b/debian/changelog
index 4c8ac9b..72f2873 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,12 +24,14 @@ apache2 (2.4.1-3) experimental; urgency=low
known.
* Build the apache2.2-bin transitional package again, without it updates from
Squeeze are broken from some use cases
+ * Remove 2.2's postrm script only if we're actually upgrading. This previously
+ didn't have bad side-effects, but caused a disturbing warning.
[ Stefan Fritsch ]
* Move /usr/share/doc alias to separate config file and don't enable it
by default.
- -- Arno Töll <debian at toell.net> Tue, 27 Mar 2012 16:52:46 +0200
+ -- Arno Töll <debian at toell.net> Tue, 27 Mar 2012 19:14:25 +0200
apache2 (2.4.1-2) experimental; urgency=low
--
Debian packaging for apache2 (Apache HTTPD 2.x)
More information about the Pkg-apache-commits
mailing list