If switching to UI status S_Update, tag the installed item as to be deleted by SOLVER
authorMichael Andres <ma@suse.de>
Wed, 12 Sep 2007 16:36:18 +0000 (16:36 +0000)
committerMichael Andres <ma@suse.de>
Wed, 12 Sep 2007 16:36:18 +0000 (16:36 +0000)
(unless installOnly is set). This way we will get a better disk usage result, even if
no autosolving is on. The next solver run will reset and recompute this setting anyway.

zypp/ui/SelectableImpl.cc

index 3e1084e..3c4c52f 100644 (file)
@@ -94,7 +94,15 @@ namespace zypp
           {
              if ( inst ) {
                  inst.status().setTransact( false, ResStatus::USER );
-                 inst.status().setLock( false, ResStatus::USER );
+                 inst.status().setLock    ( false, ResStatus::USER );
+                  if ( ! cand->installOnly() )
+                  {
+                    // This is what the solver most probabely will do.
+                    // If we are wrong the solver will correct it. But
+                    // this way we will get a better disk usage result,
+                    // even if no autosolving is on.
+                    inst.status().setTransact( true,  ResStatus::SOLVER );
+                  }
              }
               unlockCandidates();
              return cand.status().setTransact( true, ResStatus::USER );