From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id D092E3858299; Sat, 1 Oct 2022 16:34:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D092E3858299 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664642078; bh=Fj+kX4NUJTA1i/Y8SrvPQlXUTp/RkpOJWbMkm6oh5uI=; h=To:Subject:Date:From:From; b=MIwfCxlSswI4QFyZsyKjewerEMkx6p3dI0/+iKj9h3cdOiUKBJNkgTYspNEZxH179 TAro/IsFNcDiDdQBiUQRrBn4sMTS3EIPyfI+jgJkrR0ZdDKYFqL85roT8pMBDd9p5j zHlGrpoAQiwQ9XQ6/47l/iF/A8R04gQgWryA+G3Q= To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.922-2-g63a2c908 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 4bf4dd68da0344a18f6e603a5fb60df0d9231ab7 X-Git-Newrev: 63a2c9084bbb3e88e530767a31d63362f061b141 Message-Id: <20221001163438.D092E3858299@sourceware.org> Date: Sat, 1 Oct 2022 16:34:38 +0000 (GMT) From: Jon TURNEY List-Id: https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=63a2c9084bbb3e88e530767a31d63362f061b141 commit 63a2c9084bbb3e88e530767a31d63362f061b141 Author: Christian Franke 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 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) {