[Pkg-zsh-commits] [zsh] 02/02: Only handle /usr/bin/zsh symlink in postrm/remove and postinst/configure stages
Axel Beckert
abe at deuxchevaux.org
Tue Dec 27 21:38:00 UTC 2016
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch debian
in repository zsh.
commit 2be20bd00fb5bcacb2310a28ded28020e12c1654
Author: Axel Beckert <abe at deuxchevaux.org>
Date: Tue Dec 27 21:52:09 2016 +0100
Only handle /usr/bin/zsh symlink in postrm/remove and postinst/configure stages
Introducing compatibility with the standards-ignoring usrmerge
package, the zsh package started to create and remove the /usr/bin/zsh
symlink in all possible stages of the according maintainer scripts:
The symlink was even created on zsh.postinst being called with abort-*
as parameter and on zsh.postrm being called with upgrade as parameter,
leading to a removal and recreation of the symlink during upgrades and
hence being without that symlink for a more or less short timespan.
Closes: #841048
---
debian/zsh.postinst | 14 +++++++-------
debian/zsh.postrm | 11 ++++++-----
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/debian/zsh.postinst b/debian/zsh.postinst
index 5993bc2..65a4d31 100644
--- a/debian/zsh.postinst
+++ b/debian/zsh.postinst
@@ -6,6 +6,13 @@ case "$1" in
(configure)
add-shell /bin/zsh
add-shell /usr/bin/zsh
+
+ # New hardcoded symlinks which unfortunately can't be shipped inside
+ # the package itself since some people want to merge /bin and /usr/bin
+ # against FHS and all Unix tradition.
+ if [ ! -e /usr/bin/zsh -a ! -L /usr/bin/zsh ]; then
+ ln -s /bin/zsh /usr/bin/zsh
+ fi
;;
(abort-upgrade|abort-remove|abort-deconfigure)
exit 0
@@ -24,13 +31,6 @@ update-alternatives --remove ksh /bin/zsh4
update-alternatives --remove zsh /bin/zsh5
update-alternatives --remove rzsh /bin/zsh5
-# New hardcoded symlinks which unfortunately can't be shipped inside
-# the package itself since some people want to merge /bin and /usr/bin
-# against FHS and all Unix tradition.
-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.postrm b/debian/zsh.postrm
index 82649c6..5991d7e 100644
--- a/debian/zsh.postrm
+++ b/debian/zsh.postrm
@@ -6,12 +6,13 @@ case "$1" in
(remove)
remove-shell /bin/zsh
remove-shell /usr/bin/zsh
+
+ # Remove hardcoded symlink again
+ if [ -L /usr/bin/zsh ]; then
+ rm -f /usr/bin/zsh
+ fi
+
;;
esac
-# Remove hardcoded symlink again
-if [ -L /usr/bin/zsh ]; then
- rm -f /usr/bin/zsh
-fi
-
#DEBHELPER#
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/zsh.git
More information about the Pkg-zsh-commits
mailing list