FTR, with the locking with statement, without the SRU, it fails, as expected (both in bionic and xenial), e.g.:
dpkg: error: dpkg status database is locked by another process
E:Sub-process /usr/bin/dpkg returned an error code (2) Traceback (most recent call last): File "/home/jak/Projects/Ubuntu/Scratch/foo.py", line 11, in <module> c.commit() File "/usr/lib/python3/dist-packages/apt/cache.py", line 610, in commit raise SystemError("installArchives() failed") SystemError: installArchives() failed
FTR, with the locking with statement, without the SRU, it fails, as expected (both in bionic and xenial), e.g.:
dpkg: error: dpkg status database is locked by another process
E:Sub-process /usr/bin/dpkg returned an error code (2) jak/Projects/ Ubuntu/ Scratch/ foo.py" , line 11, in <module> python3/ dist-packages/ apt/cache. py", line 610, in commit "installArchive s() failed")
Traceback (most recent call last):
File "/home/
c.commit()
File "/usr/lib/
raise SystemError(
SystemError: installArchives() failed