public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: cygwin-apps-cvs@sourceware.org
Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.922-2-g63a2c908
Date: Sat,  1 Oct 2022 16:34:38 +0000 (GMT)	[thread overview]
Message-ID: <20221001163438.D092E3858299@sourceware.org> (raw)




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=63a2c9084bbb3e88e530767a31d63362f061b141

commit 63a2c9084bbb3e88e530767a31d63362f061b141
Author: Christian Franke <christian.franke@t-online.de>
Date:   Tue Sep 27 15:41:06 2022 +0200

    Ignore install requests if version is not accessible
    
    This avoids that an empty "New" version is shown when install is
    requested via "Install" from "Category" view or Ctrl+I and the
    version is not accessible.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=3152c0ed6bcc9c807e9dac6ec2141687ed662b79

commit 3152c0ed6bcc9c807e9dac6ec2141687ed662b79
Author: Christian Franke <christian.franke@t-online.de>
Date:   Mon Sep 26 16:47:42 2022 +0200

    Fix ignored install requests added before run of solver
    
    Regression was introduced by commit c99e4c1.


Diff:
---
 package_meta.cc | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/package_meta.cc b/package_meta.cc
index a5dc4364..ae19917c 100644
--- a/package_meta.cc
+++ b/package_meta.cc
@@ -539,6 +539,17 @@ packagemeta::select_action (int id, trusts const deftrust)
     {
       if (id == packagemeta::NoChange_action)
         set_action((packagemeta::_actions)id, installed);
+      else if (id == packagemeta::Install_action)
+        {
+          // Ignore install request if the default version is not accessible.
+          // This assumes that all available versions are already known.
+          // This is not always the case when set_action is called directly.
+          packageversion v = trustp (true, deftrust);
+          if (v.accessible ())
+            set_action(Install_action, v, true);
+          else
+            set_action(NoChange_action, installed);
+        }
       else
         set_action((packagemeta::_actions)id, trustp (true, deftrust), true);
     }
@@ -627,6 +638,7 @@ packagemeta::set_action (_actions action, packageversion const &default_version,
   else if (action == Install_action)
     {
       desired = default_version;
+      // If desired is empty, it will be set to the solver's preferred version later.
       if (desired)
 	{
 	  if (desired != installed)
@@ -651,13 +663,6 @@ packagemeta::set_action (_actions action, packageversion const &default_version,
 	      srcpick (false);
 	    }
 	}
-      else
-	{
-	  action = NoChange_action;
-	  desired = installed;
-	  pick (false);
-	  srcpick (false);
-	}
     }
   else if (action == Reinstall_action)
     {


                 reply	other threads:[~2022-10-01 16:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221001163438.D092E3858299@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-apps-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).