-
Notifications
You must be signed in to change notification settings - Fork 359
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
Opam 2.2 init with MSYS2 #5843
Opam 2.2 init with MSYS2 #5843
Conversation
I have trouble testing this PR.
How are users of MSYS2 expected to use opam? |
Thanks! I am going to set expectations that I won't be able to look at this for at least a week. Most likely two weeks. But I will get to it! |
Yep, same issues that @kit-ty-kate reported.
It clearly though is using Test Apparatus (for me)
|
From dev meeting, there is 2 todos in this PR:
|
…tall is a Cygwin variant install (e.g.MSYS2)
…MSYS2 have cygcheck in that path.
…s-distribution=msys2` in `global-variables` config file field
…pacman path and store it as system package manager in config file
If MSYS2 is detected via 'os-distribution' in the config file, resolve 'cygcheck' from the environment and store resulting value as Cygwin binary path in 'OpamCoreConfig.cygbin'
Updated PR, previous 2 points resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! It works really well as far as i tested! (being: opam init --bare
, opam switch create --empty
, opam install conf-autoconf
)
Thanks! |
When this makes it to a build, what will the procedure be for ripping out the OPAM Cygwin and configuring it to use my MSYS2? |
@s5bug something like:
and without the option (a simple |
Opam 2.2 init on Windows is focused on resolving a pre-existent Cygwin install, or install opam internal one. Functions that detect if a Cygwin install is present are strictly checking a Cygwin one. This behaviour broke opam usage under MSYS2. As MSYS2 Cygwin is a Cygwin variant, it is not detected, and no specific handling of paths, syscall, etc. are done.
MSYS2 is not officially supported (not testing it in a regular basis), we should ensure that we can keep MSYS2 users to have a way to use opam.
This PR fixes that behaviour by relaxing Cygwin install checks to accept variants. As for Cygwin setup for
opam init
, a check of the install is done, and to keep the information, the config file is appended withto be sure that further invocations of opam we don't loose that we are in an MSYS2 context (related to #5348).
ftm in the PR, there is no
sys-package-manager-cmd
setting, user can set it by hand usingopam option
. It is an open question.fixes #5683
/cc @jonahbeckford