cygwin / cygwin-install-action

GitHub action to install Cygwin
GNU General Public License v3.0
22 stars 11 forks source link

How do I select a specific package version #14

Open flaviojs opened 6 months ago

flaviojs commented 6 months ago

I am trying to build with cygwin (no mingw or msys2) in a windows-latest github runner. In an attempt to fix build issues I want to try an older version of gcc but don't know how to select the package version.

Can you give me an example of how it is done and update the docs? If the feature is not available, please add it.

jon-turney commented 6 months ago

Good question. Unfortunately, because Cygwin uses a rolling distribution, there are no good answers.

Setup accepts package=version-release constraints in the package list fed to it, and those probably make their way through this action unchanged, so you could probably just put those in the packages parameter to this action.

But that's unreliable, because it won't work after the required version has been expired from the Cygwin package repository.

The other method would be to pick a historical Cygwin snapshot from the Cygwin Time Machine, which has the version(s) you want, and specify the appropriate circa (timestamp) URL as the site parameter to this action.

There's definitely a need for better documentation on this point, here, but also on the Cygwin website itself...

flaviojs commented 6 months ago

Thanks for the info. =)

I tried with gcc-core=7.4.0-1 (last version with working ada) but still got the latest version installed. With gcc-core==7.4.0-1 it said version =7.4.0-1 not found so maybe setup has a bug where it parses the wanted version but ignores it in practice.

flaviojs commented 6 months ago

After fixing my build issues I dedicated some time analyzing the setup.exe source:

1) ChooserPage::applyCommandLinePackageSelection() ignores the install wanted_version when UpgradeAlsoOption is true. 2) Command line option '-g' sets UpgradeAlsoOption to true. 3) running the same command-line commands as this github actions show the same bad behavior. 4) removing the -g option installs the requested gcc-core version (7.4.0-1).

Laguna1989 commented 2 months ago

Also interested in this if it is fixed yet 👀

kmilos commented 1 month ago

Same here, would like gcc 13 from test...