[SCM] libdvd-pkg/master: Use alternative way to check if dpkg database is locked

onlyjob at users.alioth.debian.org onlyjob at users.alioth.debian.org
Sun May 15 10:14:45 UTC 2016


The following commit has been merged in the master branch:
commit 1c0cc97f399759be3664c313374826103126419a
Author: Carlos Maddela <e7appew at gmail.com>
Date:   Thu May 12 16:10:33 2016 +1000

    Use alternative way to check if dpkg database is locked
    
    Version 1.18.7 of dpkg also returns an error status of 2 when
    attempting to install /dev/zero, so this method can no longer
    be used to check the lock status. Trying to purge a non-existent
    package achieves the original behaviour.

diff --git a/debian/b-i_libdvdcss.sh b/debian/b-i_libdvdcss.sh
index 127799d..8615185 100755
--- a/debian/b-i_libdvdcss.sh
+++ b/debian/b-i_libdvdcss.sh
@@ -17,7 +17,7 @@ if [ -f "${DIR}/${PKGG}-${VERGG}.is-installed" ]; then
 fi
 
 ## check if DPKG database is locked
-dpkg -i /dev/zero 2>/dev/null
+dpkg -P non-existent-package 2>/dev/null
 if [ "$?" -eq 2 ]; then
     echo "${PKGI}: dpkg database is locked. You may need to use command \"sudo dpkg-reconfigure ${PKGI}\"."
     if [ -h "/etc/apt/apt.conf.d/${P88}" ]; then

-- 
libdvdcss-pkg packaging



More information about the pkg-multimedia-commits mailing list