[PATCH] Revert "Don't override a Keep selection"

Ken Brown kbrown@cornell.edu
Mon Oct 16 19:13:00 GMT 2017


This reverts (the rest of) commit b43b697.  Part of that commit was
already reverted in commit ff0bb3d.  The rest is not needed either
since we no longer send the upgrade flag to the solver after the user
has made their selections.
---
 libsolv.cc     | 14 +++-----------
 libsolv.h      |  1 -
 package_meta.h |  2 --
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/libsolv.cc b/libsolv.cc
index 78e73a8..9aad102 100644
--- a/libsolv.cc
+++ b/libsolv.cc
@@ -512,7 +512,6 @@ SolverTasks::setTasks()
 
       // decode UI state to action
       // skip and keep don't change dependency solution
-      // except when we want to keep an old version
       if (pkg->installed != pkg->desired)
         {
           if (pkg->desired)
@@ -520,13 +519,9 @@ SolverTasks::setTasks()
           else
             add(pkg->installed, taskUninstall); // uninstall
         }
-      else if (pkg->installed)
-	{
-	  if (pkg->picked())
-	    add(pkg->installed, taskReinstall); // reinstall
-	  else if (pkg->installed < pkg->default_version)
-	    add(pkg->installed, taskKeep); // keep
-	}
+      else if (pkg->picked())
+	add(pkg->installed, taskReinstall); // reinstall
+
       // only install action makes sense for source packages
       if (pkg->srcpicked())
         {
@@ -696,9 +691,6 @@ SolverSolution::update(SolverTasks &tasks, updateMode update, bool use_test_pack
           // we don't know how to ask solver for this, so we just add the erase
           // and install later
           break;
-	case SolverTasks::taskKeep:
-	  queue_push2(&job, SOLVER_LOCK | SOLVER_SOLVABLE, sv.id);
-	  break;
         default:
           Log (LOG_PLAIN) << "unknown task " << (*i).second << endLog;
         }
diff --git a/libsolv.h b/libsolv.h
index e448841..04233fc 100644
--- a/libsolv.h
+++ b/libsolv.h
@@ -182,7 +182,6 @@ class SolverTasks
     taskInstall,
     taskUninstall,
     taskReinstall,
-    taskKeep,
   };
   void add(const SolvableVersion &v, task t)
   {
diff --git a/package_meta.h b/package_meta.h
index d91f7c9..b6faab8 100644
--- a/package_meta.h
+++ b/package_meta.h
@@ -131,8 +131,6 @@ public:
   packageversion curr;
   /* ditto for "test" (experimental) */
   packageversion exp;
-  /* which one is the default according to the chooser global state */
-  packageversion default_version;
   /* Now for the user stuff :] */
   /* What version does the user want ? */
   packageversion desired;
-- 
2.14.2



More information about the Cygwin-apps mailing list