Bug#596793: python-apt: Add a lock argument to apt.Cache.update and apt.Cache.commit

2010-11-17 Thread Sebastian Heinlein
You have to keep in that in most cases you have to acquire more than one lock. E.g. for commit, you should hold the archive and dpkg status lock. And they have to be raised in a special order to avoid races with e.g. apt-get. That is why I decided to always hold all three locks for an aptdaemon tr

Bug#596793: python-apt: Add a lock argument to apt.Cache.update and apt.Cache.commit

2010-11-17 Thread Julian Andres Klode
tag 596793 confirmed thanks On Tue, Sep 14, 2010 at 09:49:30AM +0200, Sebastian Heinlein wrote: > Package: python-apt > Version: 0.7.97.1 > Severity: wishlist > > It would be nice to have a lock argument in the apt.cache.Cache.update() > and apt.cache.Cache.commit() methods. > > It would allow t

Bug#596793: python-apt: Add a lock argument to apt.Cache.update and apt.Cache.commit

2010-09-14 Thread Sebastian Heinlein
Here is small patch for the current debian-sid branch. === modified file 'apt/cache.py' --- apt/cache.py 2010-09-03 10:08:20 + +++ apt/cache.py 2010-09-14 08:00:13 + @@ -261,14 +261,15 @@ raise FetchFailedException(err_msg) return res -def _fetch_archives(self, f

Bug#596793: python-apt: Add a lock argument to apt.Cache.update and apt.Cache.commit

2010-09-14 Thread Sebastian Heinlein
Package: python-apt Version: 0.7.97.1 Severity: wishlist It would be nice to have a lock argument in the apt.cache.Cache.update() and apt.cache.Cache.commit() methods. It would allow to pass the fd (int) of an already acquired lock. The corresponding methods won't try to get a lock on lists/archi