prevent reinstallation of installed packages
authorStefan Schubert <schubi@suse.de>
Mon, 3 Mar 2008 16:10:07 +0000 (16:10 +0000)
committerStefan Schubert <schubi@suse.de>
Mon, 3 Mar 2008 16:10:07 +0000 (16:10 +0000)
zypp/solver/detail/ResolverUpgrade.cc

index 9caf62327d36c76cbe6b4e940a5737bd19d464a1..5929f44a83a61e768f91f4b062ff930aa1a9e67d 100644 (file)
@@ -440,7 +440,13 @@ Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
          } 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 installed): " << provider << endl;
+             if (installed->name() == provider->name()) {
+                 MIL << "  IGNORE relation match (package is installed): " << provider << endl;                  
+             } else {
+                 MIL << "  Take installed package ONLY: " << provider << endl;
+                 providersMap.clear();
+                 break; // exit for
+             }
          }       
          else {
              FindMap::iterator it = providersMap.find( provider->name() );