Skip to content

Commit

Permalink
Merge pull request #6046 from dra27/fix-setup-hang
Browse files Browse the repository at this point in the history
Adjust common flags passed to Cygwin setup
  • Loading branch information
rjbou authored Jul 1, 2024
2 parents 02a1e71 + 6d904ca commit b1c658a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ users)
## Opamfile

## External dependencies
* Always pass --no-version-check and --no-write-registry to Cygwin setup [#6046 @dra27]
* Use --quiet-mode noinput for the internal Cygwin installation (which is definitely a fully-specified command line) and --quiet-mode unattended for external Cygwin installations (in case the user does need to select something, e.g. a mirror) [#6046 @dra27]

## Format upgrade

Expand Down
9 changes: 5 additions & 4 deletions src/state/opamSysInteract.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1026,21 +1026,22 @@ let install_packages_commands_t ?(env=OpamVariable.Map.empty) config sys_package
| Cygwin ->
(* We use setup_x86_64 to install package instead of `cygcheck` that is
stored in `sys-pkg-manager-cmd` field *)
let is_internal = Cygwin.is_internal config in
[`AsUser (OpamFilename.to_string (Cygwin.cygsetup ())),
[ "--root"; (OpamFilename.Dir.to_string (Cygwin.cygroot config));
"--quiet-mode"; "noinput";
"--quiet-mode"; (if is_internal then "noinput" else "unattended");
"--no-shortcuts";
"--no-startmenu";
"--no-desktop";
"--no-admin";
"--no-version-check";
"--no-write-registry";
"--packages";
String.concat "," packages;
] @ (if Cygwin.is_internal config then
] @ (if is_internal then
let common =
[ "--upgrade-also";
"--only-site";
"--no-write-registry";
"--no-version-check";
"--site"; Cygwin.mirror;
"--local-package-dir";
OpamFilename.Dir.to_string (Cygwin.internal_cygcache ());
Expand Down

0 comments on commit b1c658a

Please sign in to comment.