Bug#810158: ksh fails to install on systems with merged /usr

2017-01-14 Thread Axel Beckert
Control: severity -1 important

Marco d'Itri wrote:
> Control: severity -1 grave
> > Patch attached.
> Merged /usr is the default since debootstrap 1.0.85, so the package
> is uninstallable on new systems.

Merged /usr is no more the default since debootstrap 1.0.87, so the
package is installable on new systems.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Bug#810158: ksh fails to install on systems with merged /usr

2016-10-22 Thread Marco d'Itri
Control: severity -1 grave

On Jan 07, Marco d'Itri  wrote:

> Patch attached.
Merged /usr is the default since debootstrap 1.0.85, so the package
is uninstallable on new systems.

-- 
ciao,
Marco


signature.asc
Description: PGP signature


Bug#810158: ksh fails to install on systems with merged /usr

2016-01-06 Thread Marco d'Itri
Package: ksh
Version: 93u+20120801-2
Severity: normal
Tags: patch
User: m...@linux.it
Usertags: usrmerge

The current usrmerge package must conflict with ksh because it would 
otherwise fail in postinst while trying to create again /usr/bin/ksh.
See #768079 for details.
Patch attached.

-- 
ciao,
Marco
diff --git a/debian/changelog b/debian/changelog
index cc7d18f..9ef7135 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+ksh (93u+20120801-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Create the /usr/bin/ksh compatibility link in postinst instead that as
+an update-alternatives slave link, to support merged /usr systems.
+(Closes: FIXME)
+
+ -- Marco d'Itri   Wed, 06 Jan 2016 04:56:37 +0100
+
 ksh (93u+20120801-2) unstable; urgency=medium
 
   * Adopted package (Closes: #691199)
diff --git a/debian/postinst b/debian/postinst
index 822ec9e..477a5c5 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -22,10 +22,13 @@ esac
 # The alternative is the mksh package.
 # For a discussion on interactions between ksh and mksh, see #764401.
 update-alternatives --install /bin/ksh ksh /bin/ksh93 20 \
---slave /usr/bin/ksh usr.bin.ksh /bin/ksh93 \
 --slave /usr/share/man/man1/ksh.1.gz ksh.1.gz \
 /usr/share/man/man1/ksh93.1.gz
 
+if [ ! -e /usr/bin/ksh -a ! -L /usr/bin/ksh ]; then
+  ln -s /bin/ksh /usr/bin/ksh
+fi
+
 # For a discussion of what we put in /etc/shells see #790118.
 add-shell /bin/ksh93
 add-shell /bin/rksh93
diff --git a/debian/prerm b/debian/prerm
index 1626b99..4626036 100644
--- a/debian/prerm
+++ b/debian/prerm
@@ -6,6 +6,10 @@ case "$1" in
 remove|deconfigure)
 update-alternatives --remove ksh /bin/ksh93
 	update-binfmts --package ksh --remove ksh /bin/ksh93
+	# remove the compatibility link if it is broken
+	if [ -L /usr/bin/ksh -a ! -e /usr/bin/ksh ]; then
+	  rm /usr/bin/ksh
+	fi
 ;;
 
 upgrade|failed-upgrade)


signature.asc
Description: PGP signature