This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=6a1a62d382bca9df105359559e08e8630c2b8f0e commit 6a1a62d382bca9df105359559e08e8630c2b8f0e Author: Guillem Jover <guil...@debian.org> AuthorDate: Sat Jan 9 00:35:39 2021 +0100 libdpkg: Do not consider the database locked with a missing lock file If the lock file does not exist, then in theory no other process is supposed to have locked the database, as the lock file uses region locking where the lock file is never supposed to be removed. In practice, misguided users might end up removing the lock file in an attempt to "unlock" the database (with potential catastrophic results) but that is not a supported operation. The supported scenario where the lock file is missing, is with a database that has not yet been fully populated. Reported-by: David Kalnischkies <donk...@debian.org> --- lib/dpkg/dbmodify.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/dpkg/dbmodify.c b/lib/dpkg/dbmodify.c index a6f8a0bcc..c8a03bc7b 100644 --- a/lib/dpkg/dbmodify.c +++ b/lib/dpkg/dbmodify.c @@ -204,9 +204,12 @@ modstatdb_is_locked(void) if (dblockfd == -1) { lockfd = open(lockfile, O_RDONLY); - if (lockfd == -1) + if (lockfd == -1) { + if (errno == ENOENT) + return false; ohshite(_("unable to check lock file for dpkg database directory %s"), dpkg_db_get_dir()); + } } else { lockfd = dblockfd; } -- Dpkg.Org's dpkg