On Wed, 17 Apr 2024 11:32:05 +0200 Chris Hofstaedtler <[email protected]> wrote: > Package: apt > Version: 2.6.1 > Severity: wishlist > > Dear APT maintainers, > > thanks for implementing DPkg::Lock::Timeout. This is very useful for > dpkg. A similar option would be very welcome for `apt update`, i.e. the > lockfile usually placed at /var/lib/apt/lists/lock. > > Without this, scheduled/timed `apt-get update` executions (correctly) > block manually started `apt-get update` executions, but the manual > execution also fails. The failure behaviour is somewhat annoying in > deployment scripts, where it can be worked around with a busy loop, but > I think this is less than ideal. > > TL;DR: please provide an option for `apt-get update` to wait on its > lock. > > Thanks, > Chris > >
I concur this. While whole-transaction-retry suggested in #1012173 would be nice but difficult-to-implement, I think our lock acquisition order is consistent, so waiting (even indefinitely) shouldn't cause a deadlock hazard, and a timeout design would be justified. Thanks, Zheyu Shen

