Again, with the correct patch for zsh.

-- 
ciao,
Marco
diff --git a/debian/changelog b/debian/changelog
index 5813292..dce895c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+zsh (5.2-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Create the /usr/bin/zsh compatibility link in postinst instead that as
+    an update-alternatives slave link, to support merged /usr systems.
+    (Closes: #768079)
+
+ -- Marco d'Itri <[email protected]>  Wed, 06 Jan 2016 05:39:48 +0100
+
 zsh (5.2-3) unstable; urgency=medium
 
   [ Axel Beckert ]
diff --git a/debian/zsh.postinst b/debian/zsh.postinst
index 2ba2202..22fc2ed 100644
--- a/debian/zsh.postinst
+++ b/debian/zsh.postinst
@@ -21,13 +21,16 @@ esac
 update-alternatives --remove zsh /usr/bin/zsh
 update-alternatives --remove ksh /usr/bin/zsh
 update-alternatives --remove ksh /bin/zsh4
-update-alternatives --install /bin/zsh zsh /bin/zsh5 51 \
-		--slave /usr/bin/zsh zsh-usrbin /bin/zsh5
+update-alternatives --install /bin/zsh zsh /bin/zsh5 51
 update-alternatives --install /bin/rzsh rzsh /bin/zsh5 51 \
 		--slave /usr/share/man/man1/rzsh.1.gz rzsh.1.gz /usr/share/man/man1/zsh.1.gz
 update-alternatives --remove zsh /bin/zsh4
 update-alternatives --remove rzsh /bin/zsh4
 
+if [ ! -e /usr/bin/zsh -a ! -L /usr/bin/zsh ]; then
+  ln -s /bin/zsh /usr/bin/zsh
+fi
+
 #DEBHELPER#
 
 exit 0
diff --git a/debian/zsh.prerm b/debian/zsh.prerm
index d49ec46..0044860 100644
--- a/debian/zsh.prerm
+++ b/debian/zsh.prerm
@@ -6,6 +6,10 @@ case "$1" in
     (remove|deconfigure)
 	update-alternatives --remove zsh /bin/zsh5
 	update-alternatives --remove rzsh /bin/zsh5
+	# remove the compatibility link if it is broken
+	if [ -L /usr/bin/zsh -a ! -e /usr/bin/zsh ]; then
+		rm /usr/bin/zsh
+	fi
     ;;
     (upgrade)
     ;;

Attachment: signature.asc
Description: PGP signature



Reply via email to