[packagekit] Session idle time, frequency_refresh_cache and frequency_get_updates

Patryk Zawadzki patrys at pld-linux.org
Tue Jun 16 02:02:02 PDT 2009


On Tue, Jun 16, 2009 at 9:49 AM, Richard Hughes<hughsient at gmail.com> wrote:
> On Mon, Jun 15, 2009 at 8:24 PM, Patryk Zawadzki<patrys at pld-linux.org> wrote:
>> 1) Session idle time signaling has been pulled from gnome-screensaver
>> so currently PK will never refresh the cache (claiming the session is
>> still active when it's been showing the screensaver for three days in
>> a row).
> Oops. I've added some code to git master to connect to gnome-session
> instead, could you please test with that please. If that works I'll do
> a 2.27.3 release.

Will test that.

>> 2) frequency_refresh_cache and frequency_get_updates seem to be doing
>> the same thing. At least judging from their descriptions. The first
>> one can only be set to "daily" when I really want to use "hourly" for
>> updating the repository, the second can be set to "hourly" but it
>> won't update the cache so it always returns the same results it did at
>> last cache refresh. Does it really make any sense to update the cache
>> once per day then query it 24 times looking for changes?
> Well, some backends can download a small amount of metadata during
> GetUpdates to make sure the results are up to date, like the yum
> backend. When we do RefreshCache on yum we download all the file lists
> and refresh and rebuild databases, and so it takes much longer with
> much more CPU time.
>
> If the backend only gets new update metadata on RefreshCache, then its
> perfectly fine to set the get updates timeout to once per day,
> although I think it makes sense to allow GetUpdates to get the latest
> lists if at all possible.

So it was intended to work like this:

1) Every hour try incremental diff. If not possible, do nothing.

2) Every day try incremental diff. Re-download the whole cache if
diffing is not possible.

At least it looks like it was from your description above. If so, it
indeed does make sense and is a matter of fixing poldek backend.

-- 
Patryk Zawadzki



More information about the PackageKit mailing list