[packagekit] yumbackend metadata_expire in mediarepo

Richard Hughes hughsient at gmail.com
Thu Jul 30 02:32:33 PDT 2009


2009/7/29 James Antill <james at fedoraproject.org>:
>  I can see that this fixes it for the media repos. ... but it's still
> wrong.

Ohh, right.

>  What are you trying to do in the above? My guess is "set a higher than
> normal expire time" and the mdpolicy forced change doesn't make much
> sense, my guess is that's copied from some other bit of code?¹

I think I inherited this code from Robin, right back at the 0.1.x
versions of PackageKit.

>  However this fails in the above desire for anything which has a higher
> than 24 hours expire time already (due to repo. knowledge that PK
> doesn't have, Eg. the fedora release repo.). Or, as with the media
> repo., anything that has a -1 expire (maybe the user is using yum like
> apt/etc.).

Right, that makes sense.

>  Similarly the override of the default 6 hours to the old default of 1.5
> hours, in the "default" code path, seems suspicious at best.

Sure, agreed.

>  Also I'm not sure why you set metadata_expire for all repos. with -1
> when there is "no network", and then turn on caching only mode (the
> later would do the same thing on it's own).

IIRC, I think I had some problem with setting
self.yumbase.conf.cache=1 and then yum still accessing repos that were
not yet setup -- would this make sense?

> ¹ Or maybe this was supposed to go into refresh_cache() instead of the
> weird hard coded update of some of the data, with no revert, hack that
> is there atm.

I agree the code is pretty crazy right now. I think with lazy_cache we
were trying to indicate that some things like getting the update list
have to have a small cache age, and others like getting the group list
could be much, much larger.

Richard.



More information about the PackageKit mailing list