Bug 159483
authorStefan Schubert <schubi@suse.de>
Tue, 21 Mar 2006 09:53:48 +0000 (09:53 +0000)
committerStefan Schubert <schubi@suse.de>
Tue, 21 Mar 2006 09:53:48 +0000 (09:53 +0000)
zypp/solver/detail/ResolverContext.cc

index b13dbc0..9ad064f 100644 (file)
@@ -359,15 +359,15 @@ ResolverContext::uninstall (PoolItem_Ref item, bool part_of_upgrade, bool due_to
     ResStatus status, new_status;
     std::string msg;
 
+    status = getStatus(item);
+    
     _XDEBUG( "ResolverContext[" << this << "]::uninstall("
                    << item << " " << (part_of_upgrade ? "part_of_upgrade" : "") << " "
                    << (due_to_obsolete ? "due_to_obsolete": "") << " "
-            << (due_to_unlink ? "due_to_unlink" : "") << ")" << "pool-status:" << item.status());
+            << (due_to_unlink ? "due_to_unlink" : "") << ")" << "context-status:" << status);
 
     assert (! (due_to_obsolete && due_to_unlink));
 
-    status = getStatus(item);
-
     if ( ( (forceResolve() // This is the behaviour of ZMD
            || upgradeMode())
          && (status.isToBeInstalled()             // \ The resolvable will be installed
@@ -375,11 +375,12 @@ ResolverContext::uninstall (PoolItem_Ref item, bool part_of_upgrade, bool due_to
         
         || ( (!forceResolve() // This is the bahaviour of YaST
               && !upgradeMode())
-            && (status.staysInstalled() || status.isToBeInstalled())               //   \ We will have the resolvable
-            && (item.status().staysInstalled() || item.status().isToBeInstalled()) //   / available.
-            && !part_of_upgrade
-            && !due_to_obsolete
-            && !due_to_unlink)) {
+             && ((status.staysInstalled() || status.isToBeInstalled())                   //   \ We will have the resolvable
+                 && (item.status().staysInstalled() || item.status().isToBeInstalled())  //   / available.
+                 || status.isToBeInstalled())                                            //   is to be installed e.g. due solver requirement
+             && !part_of_upgrade
+             && !due_to_obsolete
+             && !due_to_unlink)) {
        // We have a resolvable which should be kept on the system or is set to be installed explicit.
        // So we are not allowed deleting it. The reason WHY this resolvable has to be deleted here
        // is not show. We go back to the ResolverInfo to evaluate the reason. This reason (marked as an info)