aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/frontend-locking.patch
diff options
context:
space:
mode:
authorLibravatar Mubashshir <ahm@jadupc.com>2023-08-26 16:01:54 +0600
committerLibravatar Mubashshir <ahm@jadupc.com>2023-08-26 16:01:54 +0600
commit22b47d8f27c3d4558f1df2d79cad7a63fd7cc871 (patch)
tree4f9e55dec008a3f1de61cabfb577fe254ae6e36e /debian/patches/frontend-locking.patch
parent70faa8e9a0ff3cba74b4f753e257d56b768fcbd2 (diff)
downloadaptdaemon-22b47d8f27c3d4558f1df2d79cad7a63fd7cc871.tar.gz
aptdaemon-22b47d8f27c3d4558f1df2d79cad7a63fd7cc871.zip
Drop unused patches
Signed-off-by: Mubashshir <ahm@jadupc.com>
Diffstat (limited to 'debian/patches/frontend-locking.patch')
-rw-r--r--debian/patches/frontend-locking.patch56
1 files changed, 0 insertions, 56 deletions
diff --git a/debian/patches/frontend-locking.patch b/debian/patches/frontend-locking.patch
deleted file mode 100644
index 1045124..0000000
--- a/debian/patches/frontend-locking.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Description: Various locking fixes (LP: #1831981)
- - Implement frontend locking
- - Adjust locking order to match APT
- - Use reverse order for unlocking
-Author: Julian Andres Klode <juliank@ubuntu.com>
-Bug-Ubuntu: https://bugs.launchpad.net/bugs/1831981
-
---- a/aptdaemon/lock.py
-+++ b/aptdaemon/lock.py
-@@ -118,6 +118,7 @@ apt_pkg.init()
- #: The lock for dpkg status file
- _status_dir = os.path.dirname(apt_pkg.config.find_file("Dir::State::status"))
- status_lock = FileLock(os.path.join(_status_dir, "lock"))
-+frontend_lock = FileLock(os.path.join(_status_dir, "lock-frontend"))
-
- #: The lock for the package archive
- _archives_dir = apt_pkg.config.find_dir("Dir::Cache::Archives")
-@@ -131,19 +132,25 @@ lists_lock = FileLock(os.path.join(
- def acquire():
- """Acquire an exclusive lock for the package management system."""
- try:
-- for lock in archive_lock, status_lock, lists_lock:
-+ for lock in frontend_lock, status_lock, archive_lock, lists_lock:
- if not lock.locked:
- lock.acquire()
- except:
- release()
- raise
-
-+ os.environ['DPKG_FRONTEND_LOCKED'] = '1'
-
- def release():
- """Release an exclusive lock for the package management system."""
-- for lock in archive_lock, status_lock, lists_lock:
-+ for lock in lists_lock, archive_lock, status_lock, frontend_lock:
- lock.release()
-
-+ try:
-+ del os.environ['DPKG_FRONTEND_LOCKED']
-+ except KeyError:
-+ pass
-+
-
- def wait_for_lock(trans, alt_lock=None):
- """Acquire the system lock or the optionally given one. If the lock
---- a/aptdaemon/worker/aptworker.py
-+++ b/aptdaemon/worker/aptworker.py
-@@ -198,6 +198,8 @@ class AptWorker(BaseWorker):
- apt_pkg.config["DPkg::Options::"] = ("--log=%s/var/log/dpkg.log" %
- chroot)
- status_file = apt_pkg.config.find_file("Dir::State::status")
-+ lock.frontend_lock.path = os.path.join(os.path.dirname(status_file),
-+ "lock-frontend")
- lock.status_lock.path = os.path.join(os.path.dirname(status_file),
- "lock")
- archives_dir = apt_pkg.config.find_dir("Dir::Cache::Archives")