Repository navigation
File not found error when using --source=cygwin to install packages #2953
Copy link
Copy link
Closed
Labels
5 - ReleasedThe issue has been resolved, and released to the public for consumption.The issue has been resolved, and released to the public for consumption.BugIssues where something has happened which was not expected or intended.Issues where something has happened which was not expected or intended.
Milestone
Description
Checklist
- I have verified this is the correct repository for opening this issue.
- I have verified no other issues exist related to my problem.
- I have verified this is not an issue for a specific package.
- I have verified this issue is not security related.
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?
- Install a new version of Chocolatey (1.2.0+).
- Install Cygwin using
choco install cygwin -y --package-parameters='/InstallDir:C:\cg' - Run
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
- Operating System: 10.0.20348.0
- Windows PowerShell version: 5.1.20348.1366
- Chocolatey CLI Version: 1.2.1
- Chocolatey Licensed Extension version: 1.2.1
- Chocolatey License type:
- Terminal/Emulator: CMD
Installed Packages
Chocolatey v1.2.1
chocolatey 1.2.1
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
Cygwin 3.4.3
sysinternals 2022.11.28
5 packages installed.Output Log
2023-01-02 01:05:24,617 1156 [DEBUG] - XmlConfiguration is now operational
2023-01-02 01:05:24,680 1156 [DEBUG] - Adding new type 'WebPiService' for type 'ISourceRunner' from assembly 'choco'
2023-01-02 01:05:24,680 1156 [DEBUG] - Adding new type 'WindowsFeatureService' for type 'ISourceRunner' from assembly 'choco'
2023-01-02 01:05:24,680 1156 [DEBUG] - Adding new type 'CygwinService' for type 'ISourceRunner' from assembly 'choco'
2023-01-02 01:05:24,680 1156 [DEBUG] - Adding new type 'PythonService' for type 'ISourceRunner' from assembly 'choco'
2023-01-02 01:05:24,680 1156 [DEBUG] - Adding new type 'RubyGemsService' for type 'ISourceRunner' from assembly 'choco'
2023-01-02 01:05:24,680 1156 [DEBUG] - Adding new type 'SystemStateValidation' for type 'IValidation' from assembly 'choco'
2023-01-02 01:05:24,836 1156 [DEBUG] - Registering new command 'template' in assembly 'choco'
2023-01-02 01:05:24,836 1156 [DEBUG] - Registering new command 'upgrade' in assembly 'choco'
2023-01-02 01:05:24,836 1156 [DEBUG] - Registering new command 'export' in assembly 'choco'
2023-01-02 01:05:24,836 1156 [DEBUG] - Registering new command 'list' in assembly 'choco'
2023-01-02 01:05:24,836 1156 [DEBUG] - Registering new command 'info' in assembly 'choco'
2023-01-02 01:05:24,851 1156 [DEBUG] - Registering new command 'help' in assembly 'choco'
2023-01-02 01:05:24,851 1156 [DEBUG] - Registering new command 'config' in assembly 'choco'
2023-01-02 01:05:24,851 1156 [DEBUG] - Registering new command 'features' in assembly 'choco'
2023-01-02 01:05:24,851 1156 [DEBUG] - Registering new command 'new' in assembly 'choco'
2023-01-02 01:05:24,851 1156 [DEBUG] - Registering new command 'outdated' in assembly 'choco'
2023-01-02 01:05:24,851 1156 [DEBUG] - Registering new command 'pack' in assembly 'choco'
2023-01-02 01:05:24,851 1156 [DEBUG] - Registering new command 'pin' in assembly 'choco'
2023-01-02 01:05:24,883 1156 [DEBUG] - Registering new command 'push' in assembly 'choco'
2023-01-02 01:05:24,883 1156 [DEBUG] - Registering new command 'apikey' in assembly 'choco'
2023-01-02 01:05:24,883 1156 [DEBUG] - Registering new command 'source' in assembly 'choco'
2023-01-02 01:05:24,883 1156 [DEBUG] - Registering new command 'uninstall' in assembly 'choco'
2023-01-02 01:05:24,883 1156 [DEBUG] - Registering new command 'unpackself' in assembly 'choco'
2023-01-02 01:05:24,883 1156 [DEBUG] - Registering new command 'install' in assembly 'choco'
2023-01-02 01:05:25,023 1156 [INFO ] - ============================================================
2023-01-02 01:05:25,211 1156 [INFO ] - Chocolatey v1.2.1
2023-01-02 01:05:25,242 1156 [DEBUG] - Chocolatey is running on Windows v 10.0.20348.0
2023-01-02 01:05:25,258 1156 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2023-01-02 01:05:25,258 1156 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2023-01-02 01:05:25,289 1156 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" install cmake --source cygwin --debug --verbose
2023-01-02 01:05:25,305 1156 [DEBUG] - Received arguments: install cmake --source cygwin --debug --verbose
2023-01-02 01:05:25,367 1156 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
2023-01-02 01:05:25,398 1156 [DEBUG] - Sending message 'PreRunMessage' out if there are subscribers...
2023-01-02 01:05:25,414 1156 [DEBUG] - [Pending] Removing all pending packages that should not be considered installed...
2023-01-02 01:05:25,476 1156 [DEBUG] - Performing validation checks.
2023-01-02 01:05:25,492 1156 [DEBUG] - Global Configuration Validation Checks:
2023-01-02 01:05:25,492 1156 [DEBUG] - - Package Exit Code / Exit On Reboot = Checked
2023-01-02 01:05:25,492 1156 [DEBUG] - System State Validation Checks:
2023-01-02 01:05:25,492 1156 [DEBUG] - Reboot Requirement Checks:
2023-01-02 01:05:25,492 1156 [DEBUG] - - Pending Computer Rename = Checked
2023-01-02 01:05:25,508 1156 [DEBUG] - - Pending Component Based Servicing = Checked
2023-01-02 01:05:25,508 1156 [DEBUG] - - Pending Windows Auto Update = Checked
2023-01-02 01:05:25,508 1156 [DEBUG] - - Pending File Rename Operations = Ignored
2023-01-02 01:05:25,508 1156 [DEBUG] - - Pending Windows Package Installer = Checked
2023-01-02 01:05:25,508 1156 [DEBUG] - - Pending Windows Package Installer SysWow64 = Checked
2023-01-02 01:05:25,523 1156 [INFO ] - 2 validations performed. 2 success(es), 0 warning(s), and 0 error(s).
2023-01-02 01:05:25,539 1156 [DEBUG] - The source 'cygwin' evaluated to a 'cygwin' source type
2023-01-02 01:05:25,555 1156 [DEBUG] -
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.
2023-01-02 01:05:25,570 1156 [DEBUG] - Configuration: CommandName='install'|
CacheLocation='C:\Users\Administrator\AppData\Local\Temp\2\chocolatey'|
ContainsLegacyPackageInstalls='True'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='cygwin'|SourceType='cygwin'|Debug='True'|Verbose='True'|
Trace='False'|Force='False'|Noop='False'|HelpRequested='False'|
UnsuccessfulParsing='False'|RegularOutput='True'|QuietOutput='False'|
PromptForConfirmation='True'|DisableCompatibilityChecks='False'|
AcceptLicense='False'|AllowUnofficialBuild='False'|Input='cmake'|
AllVersions='False'|SkipPackageInstallProvider='False'|
SkipHookScripts='False'|PackageNames='cmake'|Prerelease='False'|
ForceX86='False'|OverrideArguments='False'|NotSilent='False'|
ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|AllowDowngrade='False'|
ForceDependencies='False'|PinPackage='False'|
Information.PlatformType='Windows'|
Information.PlatformVersion='10.0.20348.0'|
Information.PlatformName='Windows Server 2016'|
Information.ChocolateyVersion='1.2.1.0'|
Information.ChocolateyProductVersion='1.2.1'|
Information.FullName='choco, Version=1.2.1.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|
Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.UserName='Administrator'|
Information.UserDomainName='EC2AMAZ-VDKJE1B'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='True'|Information.IsUserRemote='True'|
Information.IsProcessElevated='True'|
Information.IsLicensedVersion='False'|Information.LicenseType='Foss'|
Information.CurrentDirectory='C:\Users\Administrator'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseEnhancedExitCodes='False'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.SkipPackageUpgradesWhenNotInstalled='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ExitOnRebootDetected='False'|
Features.LogValidationResultsOnWarnings='True'|
Features.UsePackageRepositoryOptimizations='True'|
ListCommand.LocalOnly='False'|ListCommand.IdOnly='False'|
ListCommand.IncludeRegistryPrograms='False'|ListCommand.PageSize='25'|
ListCommand.Exact='False'|ListCommand.ByIdOnly='False'|
ListCommand.ByTagOnly='False'|ListCommand.IdStartsWith='False'|
ListCommand.OrderByPopularity='False'|ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='unknown'|
ApiKeyCommand.Remove='False'|PinCommand.Command='unknown'|
OutdatedCommand.IgnorePinned='False'|
ExportCommand.IncludeVersionNumbers='False'|Proxy.BypassOnLocal='True'|
TemplateCommand.Command='unknown'|
2023-01-02 01:05:25,586 1156 [DEBUG] - _ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _
2023-01-02 01:05:25,586 1156 [DEBUG] - Running list with the following filter = ''
2023-01-02 01:05:25,601 1156 [DEBUG] - --- Start of List ---
2023-01-02 01:05:25,836 1156 [DEBUG] - chocolatey 1.2.1
2023-01-02 01:05:25,851 1156 [DEBUG] - chocolatey-compatibility.extension 1.0.0
2023-01-02 01:05:25,851 1156 [DEBUG] - chocolatey-core.extension 1.4.0
2023-01-02 01:05:25,867 1156 [DEBUG] - Cygwin 3.4.3
2023-01-02 01:05:25,867 1156 [INFO ] - Installing the following packages:
2023-01-02 01:05:25,867 1156 [INFO ] - cmake
2023-01-02 01:05:25,867 1156 [INFO ] - By installing, you accept licenses for the packages.
2023-01-02 01:05:25,914 1156 [DEBUG] - Calling command ['"cygwinsetup.exe" --quiet-mode --no-desktop --no-startmenu --root --local-package-dir \packages --site http://mirrors.kernel.org/sourceware/cygwin/ --packages cmake']
2023-01-02 01:05:25,961 1156 [WARN ] -
Chocolatey installed 0/0 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2023-01-02 01:05:25,961 1156 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2023-01-02 01:05:25,976 1156 [ERROR] - Chocolatey had an error occur:
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at chocolatey.infrastructure.commands.CommandExecutor.execute_static(String process, String arguments, Int32 waitForExitInSeconds, String workingDirectory, Action`2 stdOutAction, Action`2 stdErrAction, Boolean updateProcessPath, Boolean allowUseWindow, Boolean waitForExit)
at chocolatey.infrastructure.commands.CommandExecutor.execute(String process, String arguments, Int32 waitForExitInSeconds, String workingDirectory, Action`2 stdOutAction, Action`2 stdErrAction, Boolean updateProcessPath, Boolean allowUseWindow)
at chocolatey.infrastructure.app.services.CygwinService.install_run(ChocolateyConfiguration config, Action`1 continueAction)
at chocolatey.infrastructure.app.services.ChocolateyPackageService.perform_source_runner_function[T](ChocolateyConfiguration config, Func`2 function)
at chocolatey.infrastructure.app.services.ChocolateyPackageService.install_run(ChocolateyConfiguration config)
at chocolatey.infrastructure.app.runners.GenericRunner.run(ChocolateyConfiguration config, Container container, Boolean isConsole, Action`1 parseArgs)
at chocolatey.infrastructure.app.runners.ConsoleApplication.run(String[] args, ChocolateyConfiguration config, Container container)
at chocolatey.console.Program.Main(String[] args)
2023-01-02 01:05:25,976 1156 [DEBUG] - Exiting with 1Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
5 - ReleasedThe issue has been resolved, and released to the public for consumption.The issue has been resolved, and released to the public for consumption.BugIssues where something has happened which was not expected or intended.Issues where something has happened which was not expected or intended.


Activity
pauby commentedon Jan 2, 2023
cygwinsetupdoesn't appear to be an executable that can be called either because it's no longer there or it's not on the path. So this:Isn't going to work. The workaround would obviously be to install the
cmakepackage natively incygwinfor the time being.egor-tensin commentedon Jan 2, 2023
Sure. The issue is for a fairly useful script, which uses choco to install Cygwin & packages programmatically.
(chocolatey#2953) Store Cygwin rootDirectory in static field
(chocolatey#2953) Store Cygwin rootDirectory in static field
(chocolatey#2953) Store Cygwin rootDirectory in static field
(chocolatey#2953) CygwinService: always set RootDirectory
[-]Cannot install packages with Cygwin as source[/-][+]File not found error when using --source=cygwin to install packages[/+](chocolatey#2953) CygwinService: always set RootDirectory
(chocolatey#2953) CygwinService: always set RootDirectory
Merge pull request #3027 from vexx32/2953-cygwin
vexx32 commentedon Feb 15, 2023
🎉 This issue has been resolved in version 1.3.0 🎉
The release is available on:
Your GitReleaseManager bot 📦🚀
Merge branch 'support/1.x' into develop
gh / autotools / cygwin: use a fork of CygWin installation repo.