Bug 326277

Summary: Had to confirm one license twice
Product: [openSUSE] openSUSE 10.3 Reporter: Andreas Jaeger <aj>
Component: InstallationAssignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None CC: jdsn, snwint
Version: RC 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast2 log files

Description Andreas Jaeger 2007-09-19 09:06:22 UTC
Created attachment 173256 [details]
yast2 log files

I went in the package installer and confirmed all licenses including the java one.  Pressing "Update", I was asked again to confirm the java license.  

The java license was the last one to confirm in the packager.  Do we have an off-by-one error and forgot to set the last element?
Comment 1 Andreas Jaeger 2007-09-19 18:32:44 UTC
*** Bug 326300 has been marked as a duplicate of this bug. ***
Comment 2 Andreas Jaeger 2007-09-20 10:10:08 UTC
*** Bug 326734 has been marked as a duplicate of this bug. ***
Comment 3 Jared Jensen 2007-09-20 20:46:45 UTC
I experienced the same issue when installing.
Comment 4 Ladislav Slezák 2007-09-21 09:34:25 UTC
I checked the code and the problem seems to be in the pkg-bindings side:

Pkg::PkgGetLicenseToConfirm(package) returns license of not installed package "package". The problem is that in this case the "package" is provided by two repositories - by the installation repository and by the extra factory repository.
The function uses the first found instance in the pool.

One license has been accepted in the package selector widget (the correct one), yast then checks again for unconfirmed licenses for selected packages and finds the license for package instance which will not be installed (and for that reason it has the license not confirmed) and that's the problem.

The fix is to return license of the package instance which is selected for installation, not the license of the first found instance.


This problem should not appear when using just one installation repository (without factory).
Comment 5 Ladislav Slezák 2007-09-21 09:48:15 UTC
Here is list of the affected bindings: Pkg::PkgGetLicenseToConfirm(), Pkg::PkgGetLicensesToConfirm() and Pkg::PkgMarkLicenseConfirmed().
Comment 7 Stephan Kulow 2007-09-21 18:11:43 UTC
agreed
Comment 8 Ladislav Slezák 2007-09-24 07:28:27 UTC
Fixed in yast2-pkg-bindings-2.15.50