Bug 162745

Summary: Updating from beta8 does not update the kernel sources
Product: [openSUSE] SUSE Linux 10.1 Reporter: Andras Mantia <amantia>
Component: InstallationAssignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: Stanislav Visnovsky <visnov>
Severity: Major    
Priority: P5 - None CC: aj, ma, suse-beta
Version: Beta 9   
Target Milestone: ---   
Hardware: 64bit   
OS: Other   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: The Yast2 logs

Description Andras Mantia 2006-04-01 15:14:28 UTC
When updating from beta8 to beta9, the kernel-source package is not updated. When doing it manually it complains that the 2.6.16_rc6-git4 package is newer than the 2.6.16-8 one. I had to use force to perform the update.
Comment 1 Martin Lasarsch 2006-04-03 12:20:59 UTC
please attach /var/log/YaST2/*
Comment 2 Andras Mantia 2006-04-03 16:47:44 UTC
Created attachment 76235 [details]
The Yast2 logs

I'm not sure it has everything as due to lack of space after the install (for some reason I run out complete of free space) I cleaned some files from my system including some of the Yast logs.
Comment 3 Stefan Schubert 2006-04-06 16:26:56 UTC
I can see the bug:
1. The solver allows downgrades while an upgrade due to vendor id. Concerned packages which will be downgrade:
INSTALL (SuSE version downgrade): U_Th_[package]speex-1.0.5-9.x86_64
INSTALL (SuSE version downgrade): U_Th_[package]kernel-default-2.6.16-8.x86_64
INSTALL (SuSE version downgrade): U_Th_[package]kerry-0.1-2.x86_64
INSTALL (SuSE version downgrade): U_Th_[package]libdvdread-0.9.4-157.x86_64
INSTALL (SuSE version downgrade): U_Th_[package]kde3-i18n-hu-3.5.1-9.noarch
INSTALL (SuSE version downgrade): U_Th_[package]kde3-i18n-de-3.5.1-9.noarch
INSTALL (SuSE version downgrade): U_Th_[package]kernel-source-2.6.16-8.x86_64
INSTALL (SuSE version downgrade): U_Th_[package]wine-0.9.5-13.i586

2. The packages on CD1 will be installed with --force --nodeps after the first tries had failed.

3. After booting the concerning pool items will be evaluate by the name and architecture again (via the call PkgModuleFunctions::DoProvideNameKind).
This fails cause the installed version is greater than the new:

2006-04-01 17:28:02 <1> stein(3915) [wfm] Package.cc(DoProvideNameKind):561 DoProvideNameKind gnome-mime-data -> Bad
2006-04-01 17:28:02 <1> stein(3915) [wfm] Package.cc(DoProvideNameKind):561 DoProvideNameKind libdvdread -> Bad
2006-04-01 17:28:02 <1> stein(3915) [wfm] Package.cc(DoProvideNameKind):561 DoProvideNameKind speex -> Bad
2006-04-01 17:28:02 <1> stein(3915) [wfm] Package.cc(DoProvideNameKind):561 DoProvideNameKind wine -> Bad
2006-04-01 17:28:02 <1> stein(3915) [wfm] Package.cc(DoProvideNameKind):561 DoProvideNameKind kernel-source -> Bad

So these packages will not be installed, cause they have not been reselected for installation/update.
Comment 4 Stefan Schubert 2006-04-06 16:32:53 UTC
The following patch does conern packages which are NOT installed only.
Stano, Michl, could you please check it, if it is OK ? Thanks !!!

Index: Package.cc
===================================================================
--- Package.cc  (Revision 29814)
+++ Package.cc  (Arbeitskopie)
@@ -543,18 +543,22 @@
         // 3. best edition
         //  see QueueItemRequire in zypp/solver/detail, RequireProcess
 
-        if (!provider->arch().compatibleWith( _architecture )) {
-            MIL << "provider " << provider << " has incompatible arch '" << provider->arch() << "'" << endl;
-        }
-       else if (!item) {                                               // no provider yet
-           item = provider;
+       if (!provider.status().isInstalled())
+       {
+           // regarding items which are installable only
+           if (!provider->arch().compatibleWith( _architecture )) {
+               MIL << "provider " << provider << " has incompatible arch '" << provider->arch() << "'" << endl;
+           }
+           else if (!item) {                                           // no provider yet
+               item = provider;
+           }
+           else if (item->arch().compare( provider->arch() ) < 0) {    // provider has better arch
+               item = provider;
+           }
+           else if (item->edition().compare( provider->edition() ) < 0) {
+               item = provider;                                                // provider has better edition
+           }
        }
-       else if (item->arch().compare( provider->arch() ) < 0) {        // provider has better arch
-           item = provider;
-       }
-       else if (item->edition().compare( provider->edition() ) < 0) {
-           item = provider;                                            // provider has better edition
-       }
 
        return true;
     }
Comment 5 Ladislav Slezák 2006-04-12 11:35:41 UTC
Stano is the patch OK?
Comment 6 Stanislav Visnovsky 2006-04-12 11:39:24 UTC
I think the patch is already applied in SVN.
Comment 7 Ladislav Slezák 2006-04-12 11:51:54 UTC
Right, it's already there => FIXED