move check of installed items to distupgrade
authorStefan Schubert <schubi@suse.de>
Fri, 15 Feb 2008 17:02:32 +0000 (17:02 +0000)
committerStefan Schubert <schubi@suse.de>
Fri, 15 Feb 2008 17:02:32 +0000 (17:02 +0000)
zypp/sat/SATResolver.cc
zypp/solver/detail/ResolverUpgrade.cc

index 74d057c..ed45b96 100644 (file)
@@ -229,18 +229,15 @@ SATSolutionToPool (PoolItem item, const ResStatus & status, const ResStatus::Tra
 
 
 //----------------------------------------------------------------------------
-// helper functions for distupgrade
+// helper functions for distupgrade and installation order
 //----------------------------------------------------------------------------
 
 PoolItemList SATResolver::whoProvides(Capability cap) {
     PoolItemList itemList;
     Id p, *pp;
-    Repo *installedRepo = sat::Pool::instance().systemRepo().get();
     for (pp = pool_whatprovides(_SATPool, cap.id()) ; (p = *pp++) != 0; ) {
-       Solvable *solvable = _SATPool->solvables + p;
        PoolItem item = _pool.find (sat::Solvable(p));
-       if (item &&
-           (!installedRepo || solvable->repo != installedRepo) ) {
+       if (item) {
            itemList.push_back (item);
            MIL << item << " provides " << cap << endl;
        }
index 82833d0..04b0b7a 100644 (file)
@@ -446,7 +446,9 @@ Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
              otherVendorFound = true;
          } else if ( provider.status().isToBeUninstalled() ) {
              MIL << "  IGNORE relation match (package is tagged to delete): " << provider << endl;
-         }
+         } else if ( provider.status().isInstalled() ) {
+             MIL << "  IGNORE relation match (package is tagged to delete): " << provider << endl;
+         }       
          else {
              FindMap::iterator it = providersMap.find( provider->name() );