[SCM] Debian packaging for apache2 branch, master, updated. debian/2.4.4-6-4-gc39bfa4
Arno Töll
arno at debian.org
Sun Jun 16 09:51:48 UTC 2013
The following commit has been merged in the master branch:
commit c39bfa4f43a552e99f211cb0b7626dddea09ad58
Author: Arno Töll <arno at debian.org>
Date: Sun Jun 16 11:51:14 2013 +0200
Allow the use of apache2-maintscript-helper from a sub-function. We rely
on dpkg's arguments supplied in $1, $2 etc. This clashes with function
arguments supplied to to sh sub-function. Allow manual override in such
cases.
diff --git a/debian/changelog b/debian/changelog
index 0daad64..0e0d5e2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,12 @@ apache2 (2.4.4-7) UNRELEASED; urgency=low
* Allow access to /srv, beyond /var/www for user supplied vhosts by default.
Thanks to joeyh for pointing this out.
+ * Allow the use of apache2-maintscript-helper from a sub-function. We rely
+ on dpkg's arguments supplied in $1, $2 etc. This clashes with function
+ arguments supplied to to sh sub-function. Allow manual override in such
+ cases.
- -- Arno Töll <arno at debian.org> Sun, 09 Jun 2013 14:00:51 +0200
+ -- Arno Töll <arno at debian.org> Sun, 16 Jun 2013 11:49:30 +0200
apache2 (2.4.4-6) unstable; urgency=low
diff --git a/debian/debhelper/apache2-maintscript-helper b/debian/debhelper/apache2-maintscript-helper
index 37f0a05..4faf5c0 100644
--- a/debian/debhelper/apache2-maintscript-helper
+++ b/debian/debhelper/apache2-maintscript-helper
@@ -49,7 +49,13 @@
# dpkg supplies to maintainer scripts and similar
# information. These variables are an
# implementation detail and not to be changed.
-
+#
+# You might want to set them manually only if you
+# are calling apache2-maintscript-helper from
+# some place which does not preserve the original
+# script arguments for example when calling from
+# a subfunction instead of the main function in
+# your maintainer script
#
# INITIALIZATION
@@ -94,8 +100,25 @@ else
APACHE2_MAINTSCRIPT_PACKAGE="${APACHE2_MAINTSCRIPT_PACKAGE%.*}"
fi
- APACHE2_MAINTSCRIPT_METHOD="$1"
- APACHE2_MAINTSCRIPT_ARGUMENT="${2:-}"
+ if [ -z "$APACHE2_MAINTSCRIPT_METHOD" ] ; then
+ APACHE2_MAINTSCRIPT_METHOD="$1"
+ fi
+
+ case "$APACHE2_MAINTSCRIPT_METHOD" in
+ install|upgrade|abort-upgrade|configure|abort-remove|abort-remove|abort-deconfigure|remove|failed-upgrade|purge|disappear|abort-install)
+ # yay - recognized script
+ ;;
+ *)
+ echo "apache2-maintscript-helper invoked from a modified environment. Please hint required arguments manually" >&2
+ return 1
+ ;;
+ esac
+
+
+
+ if [ -z "$APACHE2_MAINTSCRIPT_ARGUMENT" ] ; then
+ APACHE2_MAINTSCRIPT_ARGUMENT="${2:-}"
+ fi
fi
--
Debian packaging for apache2
More information about the Pkg-apache-commits
mailing list