Show truely all updates when --all is used (bnc #557557)
authorJán Kupec <jkupec@suse.cz>
Thu, 3 Dec 2009 11:12:34 +0000 (12:12 +0100)
committerJán Kupec <jkupec@suse.cz>
Thu, 3 Dec 2009 11:12:34 +0000 (12:12 +0100)
src/update.cc

index 7e84c9c..ca1ccf1 100755 (executable)
@@ -325,14 +325,18 @@ find_updates( const ResKind & kind, Candidates & candidates )
   }
 
 
+  // get --all available updates, no matter if they are installable or break
+  // some current policy
   for_(it, pool.proxy().byKindBegin(kind), pool.proxy().byKindEnd(kind))
   {
     if (!(*it)->hasInstalledObj())
       continue;
 
-    PoolItem candidate = (*it)->updateCandidateObj();
+    PoolItem candidate = (*it)->highestAvailableVersionObj(); // bnc #557557
     if (!candidate)
       continue;
+    if (compareByNVRA((*it)->installedObj().resolvable(), candidate.resolvable()) >= 0)
+      continue;
 
     DBG << "selectable: " << **it << endl;
     DBG << "candidate: " << candidate << endl;