On Sun, 3 Sep 2023 20:48:31 +0200 Geert Stappers <stapp...@stappers.nl> wrote: > From: Geert Stappers <stapp...@debian.org> > > Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=994081 > "Upgrade Results in 'apt-get check' Failure" > > It is fairly nasty bug. Nasty because it hides well. > Thing is that the `apt check` is during development never called > as a child proces of `apt`. It reveals it self only during > an upgrade by `apt` or `apt-get`, not during a `dpkg --install`. > > Adding '--dry-run' is to prevent bail out on > E: Could not get lock /var/lib/dpkg/lock-frontend. > It is held by process PID (apt) > E: Unable to acquire the dpkg frontend lock > > Manual page of `apt-get` says about `--dry-run` > Locking will be disabled (Debug::NoLocking) so the system > state could change while apt-get is running.
No it could not. The problem is that 'apt-get check' wants to get the lock that already is taken by 'apt upgrade'. So when the lock is not taken by using --dry-run we do not have the problem that a lock is requested that already is taken. And because the lock is already taken by 'apt upgrade' it should not be possible that the system state changes.