Attached patch moves /usr/X11R6/bin directory handling into preinst instead of postinst and symlink handling to dpkg.
# HG changeset patch # User [EMAIL PROTECTED] # Node ID 99c16b0fcf1a233d0307ec53f4bb71247b9df871 # Parent f19cf5299f4bf47d1905dbd6ff922e567f8f664d Move handling of /usr/X11R6/bin dir from postinst to preinst and let dpkg handle the link. diff -r f19cf5299f4b -r 99c16b0fcf1a debian/xorg/debian/x11-common.links --- a/debian/xorg/debian/x11-common.links Tue Apr 18 23:16:54 2006 +0000 +++ b/debian/xorg/debian/x11-common.links Thu Apr 20 23:01:13 2006 +0800 @@ -1,3 +1,4 @@ usr/bin usr/bin/X11 usr/bin usr/bin/X11 +usr/bin usr/X11R6/bin usr/X11R6/lib/X11/fonts usr/lib/X11/fonts etc/X11/rgb.txt usr/share/X11/rgb.txt diff -r f19cf5299f4b -r 99c16b0fcf1a debian/xorg/debian/x11-common.postinst.in --- a/debian/xorg/debian/x11-common.postinst.in Tue Apr 18 23:16:54 2006 +0000 +++ b/debian/xorg/debian/x11-common.postinst.in Thu Apr 20 23:01:13 2006 +0800 @@ -48,13 +48,6 @@ if ! [ -L "/usr/bin/X11" ] && [ -d "/usr else ln -s ../bin /usr/bin/X11 || true fi -fi - -if [ -d "/usr/X11R6/bin" ] && [ ! -L /usr/X11R6/bin ]; then - rmdir "/usr/X11R6/bin" || die "Could not remove /usr/X11R6/bin. Is not yet empty. Please remove any items still in the directory. You can move them back after the install has completed successfully." -fi -if ! [ -e "/usr/X11R6/bin" ]; then - ln -s /usr/bin /usr/X11R6/bin || die "Could not link /usr/bin to /usr/X11R6/bin" fi # only mess with config file it exists; otherwise, assume that's the way the diff -r f19cf5299f4b -r 99c16b0fcf1a debian/xorg/debian/x11-common.preinst.in --- a/debian/xorg/debian/x11-common.preinst.in Tue Apr 18 23:16:54 2006 +0000 +++ b/debian/xorg/debian/x11-common.preinst.in Thu Apr 20 23:01:13 2006 +0800 @@ -102,6 +102,11 @@ if [ "$1" = "install" ] || [ "$1" = "upg md5sum "$XWRAPPER_CONFIG" > "$XWRAPPER_CONFIG_CHECKSUM" fi fi + + if [ -d "/usr/X11R6/bin" ] && [ ! -L /usr/X11R6/bin ]; then + rmdir "/usr/X11R6/bin" || die "Could not remove /usr/X11R6/bin. Is not yet empty. Please remove any items still in the directory. You can move them back after the install has completed successfully." + fi + fi #DEBHELPER#