public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup - the official Cygwin setup program] branch master, updated. release_2.922-2-g63a2c908
@ 2022-10-01 16:34 Jon TURNEY
0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2022-10-01 16:34 UTC (permalink / raw)
To: cygwin-apps-cvs
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)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-01 16:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-01 16:34 [setup - the official Cygwin setup program] branch master, updated. release_2.922-2-g63a2c908 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).