On Friday 06 November 2009 14:15:52 Jano Kupec wrote:
The way i see it, we'll need to add bool Fetcher::isCached public method and improve repo::PackageProvider to be able to use Fetcher::isCached before it calls any callback (well, in fact, it should report DownloadResolvableReport::gotFromCache). Maybe add bool repo::PackageProvider::provideFromCache and only use the current code flow if this returns false.
No. No one want's to know how the package is provided. I'll arrange the PackageProvider to check for a chache hit with the required checksum before actually starting the download.
Or (maybe even better) we should completely avoid calling repo::PackageProvider and get the files from cache in somewhat more direct way (e.g. by remembering the paths of files already provided by previous calls to PackageProvider during the download phase), if possible.
It's the PackageProviders task to get the package in the most direct way. If the provider is buggy or can be optimized, this should be done instead of working arround the bug. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org