[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#622342: python-apt: add option to reopen cache on update



On Tue, Apr 12, 2011 at 02:08:44PM +0200, Julian Andres Klode wrote:
> On Di, 2011-04-12 at 13:10 +0200, Patrick Schoenfeld wrote:
> > It would be nice, if update() supported that as an argument, e.g.
> > 
> > reopen=True
> > 
> > The default could be False to keep backward compatibility.
> No, we'd need yet another parameter for specifying the progress handler
> for open() then.

well, yes. And the problem about that is what? It could default
to a default progress handler like everywhere else, too.

Actually I don't even see the sense in having this as an argument and
would prefer to always reopen the cache after updating it because I
fail to see a use-case for refreshing the cache and after that using the
old one. However, the idea to do it with an argument is just to keep
backward compatibility and not surprise previous users of the api.

> > Apart from this the documentation really needs to state
> > that an open() is required after that. The info can be obtained
> > from the examples, but thats probably not the right place.
> > Better would be to state that requirement in update() documentation.
> We can add this.

Better than nothing.

Regards,
patrick



Reply to: