public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [PATCH] Revert "Don't override a Keep selection"
@ 2017-10-16 19:13 Ken Brown
  2017-10-17 18:43 ` Jon Turney
  0 siblings, 1 reply; 8+ messages in thread
From: Ken Brown @ 2017-10-16 19:13 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-10-23 12:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-16 19:13 [PATCH] Revert "Don't override a Keep selection" Ken Brown
2017-10-17 18:43 ` Jon Turney
2017-10-17 19:32   ` Ken Brown
2017-10-19  3:01     ` Ken Brown
2017-10-19 15:05       ` Ken Brown
2017-10-19 21:36         ` Ken Brown
2017-10-20 11:08           ` Ken Brown
2017-10-23 12:17             ` Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).