Bug 362003

Summary: DVD + non-oss CD: Wrong package count when adding packages
Product: [openSUSE] openSUSE 11.0 Reporter: Andreas Vetter <vetter>
Component: libzyppAssignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: Duncan Mac-Vicar <dmacvicar>
Severity: Normal    
Priority: P5 - None CC: asklein, boyd.memmott, dfabian, koenig, lslezak, ma
Version: Alpha 2   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs

Description Andreas Vetter 2008-02-14 22:52:19 UTC
I installed from DVD and later added the non-oss CD.
I started yast2 sw_single and selcted some non-oss packages (flashplayer, realplayer, java ...).

Both repos (DVD +CD) were needed. First the packages from DVD were installed. Then the installer asked for the CD, when it still showed 5 "to be installed" from DVD. When the packages from CD were installes, the 5 "to be installed" from DVD were still visible. I was not asked for the DVD again, instead SuSEconfig was run. 
Everything looked fine. 

I choose to install more software and a "check" did not complain. So I selected another java package for installation to trigger a new check, but everything was fine.

So I guess the package count for the DVD was wrong.
Comment 1 Andreas Vetter 2008-02-14 22:53:29 UTC
Created attachment 195029 [details]
y2logs
Comment 2 Jozef Uhliarik 2008-02-19 11:51:03 UTC
it seems to be problem of yast2-packager
Comment 3 Ladislav Slezák 2008-02-27 12:46:58 UTC
Um, that's strage, I found this in the log:

Zypp says that there is 101 packages to install:
2008-02-14 23:05:41 <1> dobbler(5186) [zypp] TargetImpl.cc(commit):414 toInstall:
2008-02-14 23:05:41 <1> dobbler(5186) [zypp] TargetImpl.cc(commit):414 ResObjects: 113
2008-02-14 23:05:41 <1> dobbler(5186) [zypp] TargetImpl.cc(commit):414   package:       101
2008-02-14 23:05:41 <1> dobbler(5186) [zypp] TargetImpl.cc(commit):414   pattern:       12

Yast also counted 101 packages (1st + 2nd source: 79 + 22 = 101):
2008-02-14 23:05:38 <1> dobbler(5186) [Pkg] Package.cc(PkgMediaSizesOrCount):352 Pkg::PkgMediaCount result: [[79], [22]]

But when I counted packages installed before media change requested I got 74.
After changing the medium there were 27 packages installed.

So all packages were installed correctly (74 + 27 = 101), but libzypp installed some packages from the second medium instead of the first one as it was planned.
Comment 4 Michael Andres 2008-02-27 14:56:02 UTC
The install order requires these 5 packages to be installed after some packages from the second media were installed.

Instead of jumping back to DVD1, these 5 packages are copied to a disk cache before switching to CD2. Later the installation does not require a media change.

(count the packages provided before the media change request, not the ones installed).


Future zypp releases will do even more caching, so the UI should not rely on any media change callbacks. AFAIK the package install callback provides a pointer to the package metadata, so the UI can check where the package originally came from.
Comment 5 Stefan Hundhammer 2008-02-29 16:08:21 UTC
Reassigning to yast2-packager maintainer
Comment 6 Ladislav Slezák 2008-06-06 14:23:04 UTC
*** Bug 397911 has been marked as a duplicate of this bug. ***
Comment 7 Ladislav Slezák 2008-10-15 10:20:51 UTC
The problem was that the source medium was checked only in the download callback.

I added the check also to the package installation callback, so when a package is installed from a different source than the last downloaded package the source changed callback is evaluated.

Fixed in yast2-pkg-bindings-2.17.19.
Comment 8 Ladislav Slezák 2008-11-10 12:52:11 UTC
*** Bug 416295 has been marked as a duplicate of this bug. ***
Comment 9 Ladislav Slezák 2009-01-14 09:42:57 UTC
*** Bug 402891 has been marked as a duplicate of this bug. ***