Bug#922416: cache.commit() doesn't release the archives lock
On Thu, Mar 07, 2019 at 04:42:04PM +0000, Marga Manterola wrote:
> Any news here?
>
> I thought my reproduction case was good enough to show what the problem was.
Sorry, yes. I was at a work sprint on your previous email, and then forgot
about it later! I'll try to solve it this week.
>
> In the meantime, I've solved my problem by explicitly closing the lock after the call to commit, but I think this shouldn't be
> needed.
It will probably also fail afterwards :-)
FWIW, one thing about your reproducer is that you should be keeping an
apt_pkg.SystemLock() right from the start until the program ends, so p-a
keeps the frontend lock all the time, preventing race conditions.
(unless you call apt_pkg.init_system() again in which case things
gets screwed up, as it owns the lock, so you'll have to unlock, re-init
and then lock again...).
--
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer i speak de, en
Reply to: