[Bug] setup regression

Christian Franke Christian.Franke@t-online.de
Mon Sep 26 15:14:15 GMT 2022

Jon Turney wrote:
> On 22/09/2022 17:56, Achim Gratz wrote:
>> Achim Gratz writes:
>>> Achim Gratz writes:
>>>> I had updated setup to 2.921 recently, so I rolled it back to 2.920 
>>>> and
>>>> this version does the package selection correctly.  I haven't yet 
>>>> looked
>>>> what commit is responsible, but whatever the cause of the 
>>>> regression is
>>>> still in 2.922 as well.
>>> The most likely change responsible for this is the additions in
>>> package_meta.cc in commit c99e4c14911181636892355a4f1855024051ea1d.  I
>>> might not be able to check this tomorrow, though I'll try to free up
>>> some time for that.
>> That was indeed the culprit.  I've reverted just these two hunks on top
>> of release_2.922 and things worked again.
> Yes, looking again at that change, the first hunk in package_meta.cc, 
> changing Install_action doesn't look right.

Indeed and this should be removed ASAP - patch attached.

Thanks for catching and sorry for the regression.

> If I remember correctly action=Install_action, desired=empty package 
> version (evaluating as a boolean is false) means "install the solver's 
> preferred version", so converting that to NoChange_action seems wrong.
> I'm kind of confused how to reproduce this, or why it decided to 
> install only some things, rather than nothing.
> Christian,
> From your reply to 
> https://cygwin.com/pipermail/cygwin-apps/2022-August/042212.html, it 
> seems this change is meant to handle the case where 'I' is pressed but 
> the package isn't accessible?  Although I don't seem quite how.

I made the false assumption that default_version=empty in set_action() 
always implies that the default version is not accessible. This is not 
the case for packages selected for installation before chooser is visible.

I'm working on a new fix for the "Ctrl+I pressed but current version is 
not accessible" case. The correct logic is already in toggle_action(): 
Install the most recent accessible non-test ('naively_preferred') version.

-------------- next part --------------
From 54665f0596f8ca50eff99ec8ec35970dc5fd439d Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Mon, 26 Sep 2022 16:47:42 +0200
Subject: [PATCH] Fix ignored install requests added before run of solver

Regression was introduced by commit c99e4c1.
 package_meta.cc | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/package_meta.cc b/package_meta.cc
index a5dc436..05b8946 100644
--- a/package_meta.cc
+++ b/package_meta.cc
@@ -651,13 +651,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)

More information about the Cygwin-apps mailing list