[SCM] vlc/master: debian/vlc.postinst: Fix directory to symlink upgrade in postinst.

bdrung at users.alioth.debian.org bdrung at users.alioth.debian.org
Thu Oct 4 21:30:53 UTC 2012


The following commit has been merged in the master branch:
commit 646861e2fe05db763277af2696a838826d24727c
Author: Benjamin Drung <bdrung at debian.org>
Date:   Thu Oct 4 20:09:00 2012 +0200

    debian/vlc.postinst: Fix directory to symlink upgrade in postinst.
    
    Closes: #687657
    Thanks: David Prévot <taffit at debian.org>

diff --git a/debian/vlc.postinst b/debian/vlc.postinst
new file mode 100644
index 0000000..a208a85
--- /dev/null
+++ b/debian/vlc.postinst
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+# Replace documentation directory with symlink
+docdir="/usr/share/doc/vlc"
+if [ -d $docdir ] && [ ! -L $docdir ]; then
+    if rmdir $docdir 2>/dev/null; then
+        ln -sf vlc-nox $docdir
+    fi
+fi
+
+#DEBHELPER#
diff --git a/debian/vlc.preinst b/debian/vlc.preinst
deleted file mode 100644
index 56a2c8a..0000000
--- a/debian/vlc.preinst
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-set -e
-
-case "$1" in
-	upgrade)
-		# Make sure /usr/share/doc/vlc doesn't exist or is a symlink
-		# before the unpacking (which will put the link back) - #613121
-		if dpkg --compare-versions "$2" le "2.0.1-2~" && test ! -L "/usr/share/doc/vlc"; then
-			rm -rf /usr/share/doc/vlc/
-		fi
-		;;
-esac
-
-#DEBHELPER#

-- 
VLC media player packaging



More information about the pkg-multimedia-commits mailing list