-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File not found error when using --source=cygwin to install packages #2953
Comments
Isn't going to work. The workaround would obviously be to install the |
Sure. The issue is for a fairly useful script, which uses choco to install Cygwin & packages programmatically. |
Previously there was a change to make ISourceRunner instances managed as transient instead of singletons. This is reasonable for most things, but it means we cannot rely on storing state in instance fields for ISourceRunner instances. This change ensures that the state data created by ensure_source_app_installed() can be kept around for the followup call to install_run() by storing it in a static field that all instances can make use of. We may want to discuss a design improvement/refactor to ensure that we aren't losing any other critical state data between these invocations for any other ISourceRunners.
PCurrently, ISourceRunner instances seem to be managed as transient. This is reasonable for many things, but it means we cannot rely on storing state in instance fields for ISourceRunner instances at the current time. This change ensures that the state data created by ensure_source_app_installed() can be kept around for the followup call to install_run() by storing it in a static field that all instances can make use of. We may want to discuss a design improvement/refactor to ensure that we aren't losing any other critical state data between these invocations for any other ISourceRunners.
Currently, ISourceRunner instances seem to be managed as transient. This is reasonable for many things, but it means we cannot rely on storing state in instance fields for ISourceRunner instances at the current time. This change ensures that the state data created by ensure_source_app_installed() can be kept around for the followup call to install_run() by storing it in a static field that all instances can make use of. We may want to discuss a design improvement/refactor to ensure that we aren't losing any other critical state data between these invocations for any other ISourceRunners.
Currently, ISourceRunner instances seem to be managed as transient. This is reasonable for many things, but it means we cannot rely on storing state in instance fields for ISourceRunner instances at the current time across separate invocations from the ChocolateyPackageService. This change ensures that the RootDirectory is always null-checked and set if not present. In future, we may want to discuss a design improvement/refactor to ensure that we aren't losing any other critical state data between these invocations for any other ISourceRunners.
Currently, ISourceRunner instances seem to be managed as transient. This is reasonable for many things, but it means we cannot rely on storing state in instance fields for ISourceRunner instances at the current time across separate invocations from the ChocolateyPackageService. This change ensures that the RootDirectory is always null-checked and set if not present. In future, we may want to discuss a design improvement/refactor to ensure that we aren't losing any other critical state data between these invocations for any other ISourceRunners.
Currently, ISourceRunner instances seem to be managed as transient. This is reasonable for many things, but it means we cannot rely on storing state in instance fields for ISourceRunner instances at the current time across separate invocations from the ChocolateyPackageService. This change ensures that the RootDirectory is always null-checked and set if not present. In future, we may want to discuss a design improvement/refactor to ensure that we aren't losing any other critical state data between these invocations for any other ISourceRunners.
🎉 This issue has been resolved in version 1.3.0 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
* support/1.x: (#3026) Deprecate CygwinService public methods (#2953) CygwinService: always set RootDirectory (tests) Enable local source (maint) Remove/Fix some comments mentioning WebPI (#2958) Deprecate WebPI source runner (#2981) Deprecate install with direct file path (#2985) Deprecate features/sources in `config list` (#2983) Deprecate `--remove` option for apikey cmd (#2930) Update GenerateDocs.ps1 for choco-theme (build) Update Github workflow action versions (maint) Add GitReleaseManager.yaml (build) Add GitVersion.yml file (build) Add missing Criteria (build) Update to latest Chocolatey.Cake.Recipe (build) Add parameter to not build AWS projects (#2870) Update sln and csproj files (#2870) Adds No7zip build to recipe.cake # Conflicts: # GenerateDocs.ps1 # GitVersion.yml # gitreleasemanager.yaml # src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1 # tests/chocolatey-tests/commands/choco-install.Tests.ps1 # tests/chocolatey-tests/commands/choco-list.Tests.ps1
The original stopped working, it tries to install chocolatey 1.1.0 due to some bug (explained there in the comment), but that bug seems fixed (according to: chocolatey/choco#2953). So using action with disabled downgrading chocolatey.
Checklist
What You Are Seeing?
New versions of choco cannot install packages w/
--source cygwin
. It looks like this:Adding
--noop
shows that choco for some reason doesn't set the root installation directory in the command line:What is Expected?
Packages should be installed, obviously.
How Did You Get This To Happen?
choco install cygwin -y --package-parameters='/InstallDir:C:\cg'
choco install cmake --source=cygwin
.This doesn't happen if after installing Chocolatey you downgrade it using
choco install chocolatey --version 1.1.0 --allow-downgrade -y
.In both cases (with a new and an older version), I can see that choco reads HKLM\Software\Cygwin\setup\rootdir using
procmon
.System Details
Installed Packages
Output Log
Additional Context
No response
The text was updated successfully, but these errors were encountered: