[packagekit] GetUpdates

Ken VanDine ken at vandine.org
Fri Oct 5 07:44:28 PDT 2007


For the conary backend, refresh cache and get updates are completely
unrelated, since we don't look at the cache for updates.  However, I
do agree refreshing cache should be the first operation, and let it
run periodically.  I would also like a way to manually trigger get
updates.  Perhaps in pk-update-icon, add a 3rd item for "Look for
updates".

Also, people have complained about the icon coming and going,
confusing.  Perhaps we really should just leave the icon in the
systray, and allow all the actions to be launched from there.

--Ken

On 10/5/07, Richard Hughes <hughsient at gmail.com> wrote:
> Right, we need to sort out GetUpdates and RefreshCache before we can
> even think about a release.
>
> At the moment we do (on fresh boot)
>
> <login>
> RefreshCache(false)
> GetUpdates()
> <show tray icon>
> <user clicks show updates>
> GetUpdates()
>
> Now, with the conary backend, GetUpdates isn't cheap, and so if we call
> it from multiple user sessions frequently it gets expensive very
> quickly. Yum is pretty cheap, although still inefficient.
>
> What I'm proposing is:
> <login>
> RefreshCache(false)
> GetUpdates
> <show tray icon>
> <user clicks show updates>
> cached GetUpdates results
> (update list is cached)
>
> The first time GetUpdates is called it actually does the action, the
> second just returns the internally cached result. By calling the
> RefreshCache method we invalidate the cache and then the next GetUpdate
> call will actually call the method.
>
> This means we should only have one GetUpdates refresh even when we view
> the Update Viewer multiple times.
>
> ....or, we could just add a b=use_cache parameter to GetUpdates and
> handle this dumbly in the clients.
>
> In this case I'm not sure when we should call RefreshCache - maybe we
> should say that GetUpdates should connect to the net and download the
> update list, and RefreshCache should download new indexes and rebuild
> all the package lists. Ideas?
>
> Richard.
>
>
>
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
>


-- 
Ken VanDine
http://ken.vandine.org



More information about the PackageKit mailing list