diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2020-02-26 20:31:03 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2020-02-26 20:36:52 +0100 |
| commit | 93e1565796b61eb44bec39f50e09a34cbe090178 (patch) | |
| tree | ebb655eb7496799009b672c39799f670a596eb3e /apt-pkg/pkgsystem.h | |
| parent | db678df196ccd8f9f6fb336706cf5701d1e53aa6 (diff) | |
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.
Diffstat (limited to 'apt-pkg/pkgsystem.h')
| -rw-r--r-- | apt-pkg/pkgsystem.h | 5 |
1 files changed, 3 insertions, 2 deletions
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; |
