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

Re: DoListUpdate == ?



On Thu, Jan 10, 2008 at 06:43:00AM -0800, Daniel Burrows wrote:
>   I noticed in the latest apt changelog that there's a reference to a
> "DoListUpdate" branch that has something to do with frontends and
> running list updates.  I can't find any documentation of what this is
> or what its implications are, though.  Could someone enlighten me?

My bad, sorry. I wanted to send you a patch directly, but didn't
manage to. The problem is that there is no common way to do a simple
apt-get update list operation in the frontend. So there is some
duplication of code and no central place to get e.g. hook scripts
working (a whishlist item for some time now). 

The solution was to add a 
bool ListUpdate(pkgAcquireStatus &progress, pkgSourceList &List, int PulseInterval=0)
method into algorithms. It will load the indexes into the fetcher, run
it (with the given pulse interval) and report problems via the _errror
interface. It will also deal with list cleanup and now is cappable of
running APT::Update::Pre-Invoke and (if everything was successful
(Post-Invoke) hook scripts. This is useful for systems like debtags
that will have to update there database after a apt-get update.

I ported python-apt and synaptic to the new interface (in bzr)
already. I looked briefly into aptitude as well, but it seems more
tricky as it splits the operation more into various threads.

I hope this helps, I'm happy to change anything so that it suits
aptitude better (if needed). 

Cheers,
 Michael


Reply to: