On 11/27/2009 01:16 PM, Jano Kupec wrote:
On 11/12/2009 12:33 PM, Michael Andres wrote:
On Friday 06 November 2009 23:16:44 Michael Andres wrote:
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
You would be surprised :O) See below.
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.
libzypp-6.22.1 no longer reports cached packages as being downloaded.
Would be nice if it called back to app if it gets the file from cache. Without it it's difficult to show progress like retrieving X of Y, since we don't know Y.
Looking into the future, it would be nice to be able to get such info in advance, before commit. That way the apps can show info like "need to get 100 MiB of packages (120 MiB is already cached)" or "need to get 20 of 30 packages (10 are already cached)". And then the commit progress.
Another issue is calculation of bytes that need to be downloaded _before_ we start the commit [1][2]. We do want to know how the package is provided. Whether from cache and whether a delta/patch rpm will be used. And we want to know this before the commit. [1] https://bugzilla.novell.com/show_bug.cgi?id=325922 [2] https://bugzilla.novell.com/show_bug.cgi?id=410897 -- cheers, jano Ján Kupec YaST team ---------------------------------------------------------(PGP)--- Key ID: 637EE901 Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901 ---------------------------------------------------------(IRC)--- Server: irc.freenode.net Nick: jniq Channels: #zypp #yast #suse #susecz ---------------------------------------------------------(EOF)---