bionic (1.6.3ubuntu0.1 -> 1.6.6):
root@dashing-panda:~# python3 a.py
total 0
[...]
lrwx------ 1 root root 64 Oct 18 12:07 3 -> /var/lib/dpkg/lock
l-wx------ 1 root root 64 Oct 18 12:07 6 -> 'pipe:[27578280]'
Reading package lists... Done
Building dependency tree
Reading state information... Done
total 0
[...]
l-wx------ 1 root root 64 Oct 18 12:07 6 -> 'pipe:[27578280]'
Traceback (most recent call last):
File "a.py", line 13, in <module>
apt_pkg.pkgsystem_unlock()
apt_pkg.Error: E:Not locked
[...]
=> We can see that the cache was already unlocked when it should not
have been
root@dashing-panda:~# apt install libapt-pkg5.0
[...]
Unpacking libapt-pkg5.0:amd64 (1.6.6) over (1.6.3ubuntu0.1) ...
[...]
root@dashing-panda:~# python3 a.py
total 0
[...]
lrwx------ 1 root root 64 Oct 18 12:08 3 -> /var/lib/dpkg/lock-frontend
lrwx------ 1 root root 64 Oct 18 12:08 4 -> /var/lib/dpkg/lock
l-wx------ 1 root root 64 Oct 18 12:08 6 -> 'pipe:[27578280]'
Reading package lists... Done
Building dependency tree
Reading state information... Done
total 0
[...]
lrwx------ 1 root root 64 Oct 18 12:08 3 -> /var/lib/dpkg/lock-frontend
lrwx------ 1 root root 64 Oct 18 12:08 4 -> /var/lib/dpkg/lock
l-wx------ 1 root root 64 Oct 18 12:08 6 -> 'pipe:[27578280]'
root@dashing-panda:~#
=> script worked fine, we see that the lock is still open in the second
ls, and there are no error messages
** Tags removed: verification-needed-bionic
** Tags added: verification-done-bionic
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1794053
Title:
pkgCacheFile unlocks in destructor even if it did not acquire lock
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1794053/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs