From 93e1565796b61eb44bec39f50e09a34cbe090178 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 26 Feb 2020 20:31:03 +0100 Subject: apt(8): Wait for frontend and cache lock This is a rework of !6 with additional stuff for the frontend lock, so we can lock the frontend lock and then keep looping over dpkg lock. --- apt-pkg/pkgsystem.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apt-pkg/pkgsystem.h') diff --git a/apt-pkg/pkgsystem.h b/apt-pkg/pkgsystem.h index dca5747c1..10065d0ce 100644 --- a/apt-pkg/pkgsystem.h +++ b/apt-pkg/pkgsystem.h @@ -46,6 +46,7 @@ class pkgPackageManager; class pkgVersioningSystem; class Configuration; class pkgIndexFile; +class OpProgress; class pkgSystemPrivate; class APT_PUBLIC pkgSystem @@ -62,7 +63,7 @@ class APT_PUBLIC pkgSystem /* Prevent other programs from touching shared data not covered by other locks (cache or state locks) */ - virtual bool Lock() = 0; + virtual bool Lock(OpProgress *const Progress = nullptr) = 0; virtual bool UnLock(bool NoErrors = false) = 0; /* Various helper classes to interface with specific bits of this @@ -124,7 +125,7 @@ class APT_PUBLIC pkgSystem * lock without releasing the overall outer lock, so that dpkg can run * correctly but no other APT instance can acquire the system lock. */ - virtual bool LockInner() = 0; + virtual bool LockInner(OpProgress *const Progress = 0, int timeOutSec = 0) = 0; virtual bool UnLockInner(bool NoErrors = false) = 0; /// checks if the system is currently locked virtual bool IsLocked() = 0; -- cgit v1.2.3-70-g09d2