*** This bug is a duplicate of bug 1794053 *** https://bugs.launchpad.net/bugs/1794053
I fixed this in 1.7.0, but forgot about this bug and tracked it in bug 1794053, so marking this as a duplicate. ** Changed in: apt (Ubuntu) Status: Triaged => Fix Released ** This bug has been marked a duplicate of bug 1794053 pkgCacheFile unlocks in destructor even if it did not acquire lock -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/707540 Title: Destroying pkgCacheFile releases system lock Status in apt package in Ubuntu: Fix Released Bug description: Binary package hint: python-apt This code should work, but doesn't: >>> import apt_pkg >>> apt_pkg.init() >>> with apt_pkg.SystemLock(): ... 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 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/707540/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp