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

Fix: distinguish MSYS2 from Cygwin #5404

Merged
merged 3 commits into from
Jan 18, 2023
Merged

Conversation

jonahbeckford
Copy link
Contributor

The original code looked like it had a bad merge at some point in its history (duplicates the if condition):

            if (OpamString.ends_with ~suffix:"cygwin1.dll" tx ||
                OpamString.ends_with ~suffix:"msys-2.0.dll" tx) then
            (* ... *)
            else if OpamString.ends_with ~suffix:"msys-2.0.dll" tx then

Without this PR, MSYS2 uses cp -PRr instead of the intended rsync; rsync is a reasonable fallback for the lack of symlinks in MSYS2, and it copies binaries correctly (ex. if both dune and dune.exe are in the same directory, cp will fail).

The PR does not affect Cygwin which by default uses symlinks.

This PR is the real fix to https://github.com/ocaml/dune/blob/fa3aa2891ac74828a81f73894fe247f69c530c81/ci/build-test.sh#L82-L94 and similar failures.

master_changes.md Outdated Show resolved Hide resolved
@jonahbeckford jonahbeckford marked this pull request as ready for review December 29, 2022 11:44
Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Possible new location for the deleted comment 🙂

src/core/opamStd.ml Show resolved Hide resolved
Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@dra27 dra27 merged commit 9fc4baa into ocaml:master Jan 18, 2023
@rjbou rjbou added this to PR in progress in Opam 2.2.0 via automation Mar 11, 2023
@rjbou rjbou added this to the 2.2.0~alpha milestone Mar 11, 2023
@rjbou rjbou moved this from PR in progress to Done in Opam 2.2.0 Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Opam 2.2.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants