Destroying pkgCacheFile releases system lock
Bug #707540 reported by
Evgeny Kapun
This bug report is a duplicate of:
Bug #1794053: pkgCacheFile unlocks in destructor even if it did not acquire lock.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
High
|
Julian Andres Klode |
Bug Description
Binary package hint: python-apt
This code should work, but doesn't:
>>> import apt_pkg
>>> apt_pkg.init()
>>> with apt_pkg.
... x = apt_pkg.Cache()
... del x
Reading package lists... Done
Building dependency tree
Reading state information... Done
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
SystemError: E:Not locked
(lines beginning with ... should be indented, but Launchpad collapses multiple spaces into one when not at the beginning of the line)
Architecture: amd64
apt 0.8.10ubuntu1
python-apt 0.7.100.1ubuntu4
description: | updated |
Changed in apt (Ubuntu): | |
status: | Confirmed → In Progress |
status: | In Progress → Triaged |
importance: | Undecided → High |
To post a comment you must log in.
APT's pkgCacheFile unlocks the system when destructed or closed. I'm not sure why.