xenial ======
With 1.2.27 -----------
root@glowing-mastodon:~# python3 a.py total 0 [...] lrwx------ 1 root root 64 Oct 18 12:15 3 -> /var/lib/dpkg/lock l-wx------ 1 root root 64 Oct 18 12:15 6 -> pipe:[27632799] Reading package lists... Done Building dependency tree Reading state information... Done total 0 [...] l-wx------ 1 root root 64 Oct 18 12:15 6 -> pipe:[27632799] Traceback (most recent call last): File "a.py", line 13, in <module> apt_pkg.pkgsystem_unlock() SystemError: E:Not locked
=> broken as expected
With 1.2.29 -----------
root@glowing-mastodon:~# python3 a.py total 0 [...] lrwx------ 1 root root 64 Oct 18 12:17 3 -> /var/lib/dpkg/lock-frontend lrwx------ 1 root root 64 Oct 18 12:17 4 -> /var/lib/dpkg/lock l-wx------ 1 root root 64 Oct 18 12:17 6 -> pipe:[27632799] Reading package lists... Done Building dependency tree Reading state information... Done total 0 [...] lrwx------ 1 root root 64 Oct 18 12:17 3 -> /var/lib/dpkg/lock-frontend lrwx------ 1 root root 64 Oct 18 12:17 4 -> /var/lib/dpkg/lock l-wx------ 1 root root 64 Oct 18 12:17 6 -> pipe:[27632799] root@glowing-mastodon:~#
=> lock is still held at second ls, and releasing it worked fine.
xenial
======
With 1.2.27
-----------
root@glowing- mastodon: ~# python3 a.py pkg.pkgsystem_ unlock( )
total 0
[...]
lrwx------ 1 root root 64 Oct 18 12:15 3 -> /var/lib/dpkg/lock
l-wx------ 1 root root 64 Oct 18 12:15 6 -> pipe:[27632799]
Reading package lists... Done
Building dependency tree
Reading state information... Done
total 0
[...]
l-wx------ 1 root root 64 Oct 18 12:15 6 -> pipe:[27632799]
Traceback (most recent call last):
File "a.py", line 13, in <module>
apt_
SystemError: E:Not locked
=> broken as expected
With 1.2.29
-----------
root@glowing- mastodon: ~# python3 a.py dpkg/lock- frontend dpkg/lock- frontend mastodon: ~#
total 0
[...]
lrwx------ 1 root root 64 Oct 18 12:17 3 -> /var/lib/
lrwx------ 1 root root 64 Oct 18 12:17 4 -> /var/lib/dpkg/lock
l-wx------ 1 root root 64 Oct 18 12:17 6 -> pipe:[27632799]
Reading package lists... Done
Building dependency tree
Reading state information... Done
total 0
[...]
lrwx------ 1 root root 64 Oct 18 12:17 3 -> /var/lib/
lrwx------ 1 root root 64 Oct 18 12:17 4 -> /var/lib/dpkg/lock
l-wx------ 1 root root 64 Oct 18 12:17 6 -> pipe:[27632799]
root@glowing-
=> lock is still held at second ls, and releasing it worked fine.