forked from ocaml/opam
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Combination of all three remaining PRs for beta3 #23
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously, --git-location was treated as a default answer for the Git menu, so it would display an error if Git wasn't found, but then simply exit and fallback to adding Git to the Cygwin installation. Fix this and validate either --git-location argument or the git-location opamrc field as referring to a directory which contains Git.
Rather than filtering git out of the package list, instead add it when required.
Make the ~cygbin parameter to the various executable identification functions optional. The parameter is renamed to search_in_first with a slightly revised semantics - if cygcheck.exe is not found in the directory, then PATH is still searched. This has a key benefit early on in opam init, as it allows cygbin to be set for an internal Cygwin installation which has not yet happened, but still permits curl (et al) to be used from PATH (e.g. when running opam init from an MSYS2 shell). Where before ~cygbin implied that cygcheck _must_ be used from the directory, the new parameter effectively prepends an additional directory to PATH.
Previously, MSYS2 required os-distribution to be overridden in global-variables. Now, as with Cygwin, it is inferred in the same way from cygcheck. In this commit, opam init still sets os-distribution, however, if it is manually removed from the root config file, previously `opam var os-distribution` would return `win32` but now returns `msys2`. Additionally, sys_pkg_manager_cmd is handled in the same way for MSYS2 as for Cygwin, allowing MSYS2 to be automatically added in the same way as Cygwin.
Single argument function with a non-base type.
Includes more checks and also returns the kind of installation which was found.
…te setup-x86_64.exe.sha512 I think I must have had in mind originally caching the sha512.sum file from Cygwin.com, but what's ended up is unnecessarily complicated. Instead, if setup-x86_64.exe then we compute its sha512; download sha512.sum from Cygwin (which we assume will be quick) and compare that before continuing to download setup-x86_64.exe if it's changed.
The ability to copy setup-x86_64.exe is no longer needed - but restore the previous functionality which only downloaded setup if it didn't exist and use this when displaying a command to the user. In this mode, we only download setup-x86_64.exe so that the command we give to the user actually works. If we're actually going to run setup-x86_64.exe, then we download the latest version.
Factor out the computation of the expected bindir.
Refactored to use "Add Git to" / "Use Git from" for both --cygwin-location and when tools were found in PATH.
It is needed for Cygwin installation, that doesn't handle paths with space. At init, detection and redirection are done, afterwards opam always load redirected opam root. Original root directory is stored in `OpamStateConfig.!r.original_root_dir`.
Previously, if the redirection was left behind but the redirected root had been deleted, opam proceeded without any indication at all (easy if either C:\opamroot has been deleted or, as in current behaviour, when aborted opam init doesn't clean the redirection)
The rm -rf C:\opamroot can't stay!
… may take some time
dra27
force-pushed
the
opamroot-redirect
branch
2 times, most recently
from
June 10, 2024 11:02
c2d6f0d
to
839acdb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.