[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 c7131e290cd996fcb320e04010fa595e71348810
Author: Jean-Michel Vourgère <jmv_deb at nirgal.com>
Date:   Fri Jul 19 12:20:05 2013 +0200

    Moved /etc/javascript-common/ to x/conf-available/
    
    conf-enabled/ and conf.d files are now proper links on conf-available ones.
    
    New maintscript with hack around dpkg bug #584185.
    
    Renamed source file lighttpd.conf into 90-javascript-alias.conf.

diff --git a/lighttpd.conf b/90-javascript-alias.conf
similarity index 100%
rename from lighttpd.conf
rename to 90-javascript-alias.conf
diff --git a/debian/changelog b/debian/changelog
index 21b8837..1a9bec8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,7 +6,11 @@ javascript-common (9) UNRELEASED; urgency=low
   * Make lintian happy:
     . Bumped standard to 3.9.4 (no change required).
     . Canonicalize control vcs-fields.
-  * Use more recent helpers:
+  * Moved /etc/javascript-common conffiles into their final conf-available
+    locations.
+    conf-enabled/ and conf.d files are now proper links on conf-available ones.
+    . New maintscript.
+    . Renamed source file lighttpd.conf into 90-javascript-alias.conf.
     . Bumped to compat level 9.
     . Adjusted Depends on debhelper >= 9
   * Add copyright format version.
diff --git a/debian/javascript-common.install b/debian/javascript-common.install
index 3ed419c..602d1b0 100644
--- a/debian/javascript-common.install
+++ b/debian/javascript-common.install
@@ -1 +1,2 @@
-*.conf		/etc/javascript-common
+javascript-common.conf    /etc/apache2/conf-available/
+90-javascript-alias.conf  /etc/lighttpd/conf-available/
diff --git a/debian/javascript-common.maintscript b/debian/javascript-common.maintscript
new file mode 100644
index 0000000..7637eb4
--- /dev/null
+++ b/debian/javascript-common.maintscript
@@ -0,0 +1,5 @@
+mv_conffile /etc/javascript-common/javascript-common.conf /etc/apache2/conf-available/javascript-common.conf 8
+mv_conffile /etc/javascript-common/lighttpd.conf /etc/lighttpd/conf-available/90-javascript-alias.conf 8
+# This will trigger a message:
+# warning: unable to delete old directory '/etc/javascript-common': Directory not empty
+# see dpkg bug #584185
diff --git a/debian/javascript-common.postinst b/debian/javascript-common.postinst
index 4f2ac53..7053bde 100644
--- a/debian/javascript-common.postinst
+++ b/debian/javascript-common.postinst
@@ -19,14 +19,14 @@ case "${1}" in
 		mkdir -p /etc/apache2/conf.d
 		if [ ! -e /etc/apache2/conf.d/javascript-common.conf ]
 		then
-			ln -s /etc/javascript-common/javascript-common.conf /etc/apache2/conf.d/javascript-common.conf
+			ln -s ../conf-available/javascript-common.conf /etc/apache2/conf.d/javascript-common.conf
 			invoke-rc.d apache2 reload || true
 		fi
 
 		mkdir -p /etc/lighttpd/conf-enabled
 		if [ ! -e /etc/lighttpd/conf-enabled/90-javascript-alias.conf ]
 		then
-			ln -s /etc/javascript-common/lighttpd.conf /etc/lighttpd/conf-enabled/90-javascript-alias.conf
+			ln -s ../conf-available/90-javascript-alias.conf /etc/lighttpd/conf-enabled/90-javascript-alias.conf
 			invoke-rc.d lighttpd reload || true
 		fi
 		;;
@@ -42,4 +42,11 @@ esac
 
 #DEBHELPER#
 
+# This is a work around bug #584185:
+# Will make piupart more happy on upgrades
+if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt-nl "9"
+then
+	rmdir --ignore-fail-on-non-empty /etc/javascript-common
+fi
+
 exit 0

-- 
javascript-common



More information about the Pkg-javascript-commits mailing list