Skip to content
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

Adjust common flags passed to Cygwin setup #6046

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,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
Loading