[Pkg-javascript-commits] [SCM] javascript-common branch, master, updated. 7-22-g2d7cc38

Jean-Michel Vourgère jmv_deb at nirgal.com
Sun Jul 28 22:22:00 UTC 2013


The following commit has been merged in the master branch:
commit 3f674534e295065af9d2c751835f557cd104d97d
Author: Jean-Michel Vourgère <jmv_deb at nirgal.com>
Date:   Fri Jul 19 01:40:35 2013 +0200

    Only disable in postrm on remove|purge
    
    not on upgrades.
    Also added comments with overview of scripts parameters.

diff --git a/debian/changelog b/debian/changelog
index afa6506..21b8837 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ javascript-common (9) UNRELEASED; urgency=low
     . Bumped to compat level 9.
     . Adjusted Depends on debhelper >= 9
   * Add copyright format version.
+  * Only disable in postrm on remove|purge, not on upgrades.
 
  -- Jean-Michel Vourgère <jmv_deb at nirgal.com>  Thu, 18 Jul 2013 20:41:16 +0200
 
diff --git a/debian/javascript-common.postinst b/debian/javascript-common.postinst
index ad8c6bd..4f2ac53 100644
--- a/debian/javascript-common.postinst
+++ b/debian/javascript-common.postinst
@@ -2,6 +2,18 @@
 
 set -e
 
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
 case "${1}" in
 	configure)
 		mkdir -p /etc/apache2/conf.d
@@ -20,7 +32,6 @@ case "${1}" in
 		;;
 
 	abort-upgrade|abort-remove|abort-deconfigure)
-
 		;;
 
 	*)
diff --git a/debian/javascript-common.postrm b/debian/javascript-common.postrm
index d37ae50..6503496 100644
--- a/debian/javascript-common.postrm
+++ b/debian/javascript-common.postrm
@@ -2,17 +2,42 @@
 
 set -e
 
-if [ -L /etc/apache2/conf.d/javascript-common.conf ]
-then
-	rm -f /etc/apache2/conf.d/javascript-common.conf
-	invoke-rc.d apache2 reload || true
-fi
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
 
-if [ -L /etc/lighttpd/conf-enabled/90-javascript-alias.conf ]
-then
-	rm -f /etc/lighttpd/conf-enabled/90-javascript-alias.conf
-	invoke-rc.d lighttpd reload || true
-fi
+case "${1}" in
+	remove|purge)
+		if [ -L /etc/apache2/conf.d/javascript-common.conf ]
+		then
+			rm -f /etc/apache2/conf.d/javascript-common.conf
+			invoke-rc.d apache2 reload || true
+		fi
+		
+		if [ -L /etc/lighttpd/conf-enabled/90-javascript-alias.conf ]
+		then
+			rm -f /etc/lighttpd/conf-enabled/90-javascript-alias.conf
+			invoke-rc.d lighttpd reload || true
+		fi
+		;;
+
+	upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+		;;
+
+	*)
+		echo "postinst called with unknown argument \`${1}'" >&2
+		exit 1
+		;;
+esac
 
 #DEBHELPER#
 

-- 
javascript-common



More information about the Pkg-javascript-commits mailing list