Bug#878026: libvlc-bin: misleading error on install if no plugins exist

Ross Vandegrift ross at kallisti.us
Sun Oct 8 20:08:04 UTC 2017


Package: src:vlc
Version: 2.2.6-1~deb9u1
Severity: normal
Tags: patch

When libvlc-bin is installed without any plugins, this error is seen:

WARNING: Regenerating VLC plugin cache failed.
Please run '/usr/lib/x86_64-linux-gnu/vlc/vlc-cache-gen -f /usr/lib/x86_64-linux-gnu/vlc/plugins' manually.

Something like the attached patch (untested) would be nice.

Thanks,
Ross


-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (500, 'stable'), (40, 'unstable'), (30, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.7.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libvlc-bin depends on:
ii  libc6    2.24-11+deb9u1
ii  libvlc5  2.2.6-1~deb9u1

libvlc-bin recommends no packages.

libvlc-bin suggests no packages.

Versions of packages libvlc5 depends on:
ii  dpkg         1.18.24
ii  libc6        2.24-11+deb9u1
ii  libvlccore8  2.2.6-1~deb9u1

libvlc5 recommends no packages.

Versions of packages libvlccore8 depends on:
ii  dpkg         1.18.24
ii  libc6        2.24-11+deb9u1
ii  libdbus-1-3  1.10.22-0+deb9u1
ii  libidn11     1.33-1

Versions of packages libvlccore8 recommends:
ii  libproxy-tools  0.4.14-2

-- no debconf information
-------------- next part --------------
diff --git a/debian/libvlc-bin.postinst.in b/debian/libvlc-bin.postinst.in
index 022983e..3b00a3c 100644
--- a/debian/libvlc-bin.postinst.in
+++ b/debian/libvlc-bin.postinst.in
@@ -2,9 +2,11 @@
 set -e
 
 run_vlc_cache_gen() {
-    if ! /usr/lib/#DEB_HOST_MULTIARCH#/vlc/vlc-cache-gen -f /usr/lib/#DEB_HOST_MULTIARCH#/vlc/plugins ; then
-        echo "WARNING: Regenerating VLC plugin cache failed."
-        echo "Please run '/usr/lib/#DEB_HOST_MULTIARCH#/vlc/vlc-cache-gen -f /usr/lib/#DEB_HOST_MULTIARCH#/vlc/plugins' manually."
+    if find /usr/lib/#DEB_HOST_MULTIARCH#/vlc/plugins -type f > /dev/null 2> /dev/null; then
+	if ! /usr/lib/#DEB_HOST_MULTIARCH#/vlc/vlc-cache-gen -f /usr/lib/#DEB_HOST_MULTIARCH#/vlc/plugins ; then
+            echo "WARNING: Regenerating VLC plugin cache failed."
+            echo "Please run '/usr/lib/#DEB_HOST_MULTIARCH#/vlc/vlc-cache-gen -f /usr/lib/#DEB_HOST_MULTIARCH#/vlc/plugins' manually."
+	fi
     fi
 }
 


More information about the pkg-multimedia-maintainers mailing list