[packagekit] Getting the updates and refreshing the cache

Richard Hughes hughsient at gmail.com
Mon Nov 19 14:44:51 PST 2007


Guys,

Ken mentioned to me on IRC that we have a problem with the check update
code. (gnome-packagekit/src/pk-auto-refresh.c)

This is always one area of code that seemed to "sort-of" work for me,
although contains lots of FIXME's that could be sorted out then the
daemon was more square. Consequently, this code is now doing strange
things and needs fixing. The source of the bugs is thus:

1. We want to check for updates every $delay hours (when the network is
up and when the session has logged in for $delay3 minutes and quiesced)

2. We want to update the cache every $delay2 hours (only when the user
is idle, the network is up and the computer is on ac power)

Now, at the moment $delay and $delay2 are hardcoded at one hour and
$delay3 is set at 30 seconds. Ideally, $delay should be read from gconf,
and $delay2 should probably be hardcoded to once every 12 hours or
something.

Assumptions we are making:

1. Updating the cache takes a long time (10 minutes?) and is network and
CPU intensive
2. Getting updates requires going online and may be non-trivial,
although is quicker than updating the cache (2 minutes?)
3. The internal updates-cache isn't coming into play (the daemon becomes
inactive and quits)
4. We don't need to update the cache before we get the updates for any
of the backends

So, are these numbers and interactions sane?

Richard.




More information about the PackageKit mailing list