Bugzilla – Bug 325922
Zypper shows wrong overall download size when delta rpms are used
Last modified: 2016-01-29 15:15:27 UTC
The overall download size reported by zypper does not consider delta rpm size (and maybe patch rpms size, too): vmware:~ # zypper in -t patch kernel * Reading repository 'openSUSE-10.3-Updates' cache * Reading repository 'FACTORY - Main Repository (DEBUG)' cache * Reading repository 'openSUSE-10.3-OSS-KDE 10.3' cache * Reading repository 'KDE4' cache * Reading installed packages [100%] The following package is going to be upgraded: kernel-default The following NEW patch is going to be installed: kernel Overall download size: 20.1 M. After the operation, 155.0 B will be freed. Continue? [yes/no]: y [...] Downloading package kernel-default-2.6.22.5-12.i586, 20.1 M (62.5 M unpacked) Downloading delta: ./rpm/i586/kernel-default-2.6.22.5-10_12.i586.delta.rpm, 4.4 M Downloading: kernel-default-2.6.22.5-10_12.i586.delta.rpm * Downloading [100%] Applying delta: /var/adm/mount/AP_0x0000000d/rpm/i586/kernel-default-2.6.22.5-10_12.i586.delta.rpm * Installing: kernel-default-2.6.22.5-12 [100%] WARNING: One of installed patches requires a reboot of your machine. Please do it as soon as possible.
Michael, please have a look. I assume the "Downloading" output is triggered by a callback. Why is the 'full package download' callback triggered at all ?
There are no different kinds of 'package download' callbacks. In fact there is one and it is called 'provide package'. Starting to provide a package, we don't know what will be downloaded. If we find a delta candidate, we may give it a try and download it. If applydeltarpm fails for some reason, we try another delta or look for a patch. And if all fails we try the full package. 'provide package start' is reported, and each file we download is reported. So it should be: Providing package kernel-default-2.6.22.5-12.i586 Downloading delta: kernel-default-2.6.22.5-10_12.i586.delta.rpm, 4.4 M Applying delta: ... Delta failed. Try next: Downloading patch: kernel-default-2.6.22.5-12, 8 M Patch failed. Try next: Downloading package kernel-default-2.6.22.5-12.i586, 20.1 M
Comment #1 #2, thanx for the clarification. Question of integrating of the media callbacks into the rest of libzypp is something we should certainly have a look at. About the original bug, hmm.., having this patch/delta stuff around, it will be a bit tricky to determine the download size. But at least for the success scenario (applying delta succeded) it could be accurate. Zypper will need to determine which file will zypp try to download to do this. Do we already have something to get that info from zypp?
Still happens in 11.2
As it can't be predicted whether application of the delta will actually be possible, overall download size will always assume the worst case; i.e. download the full package.