[Yum-devel] [PATCH 1/2] _retrieveMD: no exception when retrieve_can_fail. BZ 858510

Zdenek Pavlas zpavlas at redhat.com
Mon Sep 24 09:06:30 UTC 2012


>  I'm 99% sure the reason for the ordering here is to solve this case:
> 
> 1. Getting a non-unique name like "primary.xml.gz".
> 
> 2. root cache has an old version.
> 
> 3. user runs, and does the preload ... but has to download a newer
> version anyway. No real problem.
> 
> 4. user runs again, but now we _really_ don't want to do the preload
> again as it'll delete the correct data.
> 
> ...so we check what's in our cache before loading from our preload
> cache.

There's a timestamp check in _preload_file(), it should never
overwrite a newer file with an older one.  RPMs work the same way:
preloading in getPackage() first, then verify the checksum in _getFile().


More information about the Yum-devel mailing list