summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2016-12-27 21:52:09 +0100
committerAxel Beckert <abe@deuxchevaux.org>2016-12-27 21:58:18 +0100
commit2be20bd00fb5bcacb2310a28ded28020e12c1654 (patch)
treef0921aeb95319bdc43b7ff936fbbe041747d217f
parent39e03ff0ebfa846af7158252b62981064c0df71e (diff)
downloadzsh-2be20bd00fb5bcacb2310a28ded28020e12c1654.tar.gz
zsh-2be20bd00fb5bcacb2310a28ded28020e12c1654.zip
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
-rw-r--r--debian/zsh.postinst14
-rw-r--r--debian/zsh.postrm11
2 files changed, 13 insertions, 12 deletions
diff --git a/debian/zsh.postinst b/debian/zsh.postinst
index 5993bc276..65a4d3141 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 82649c6ee..5991d7e53 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#