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

Small refactoring and fixes to opam init on Windows. #6000

Merged
merged 15 commits into from
Jun 10, 2024

Commits on Jun 10, 2024

  1. Configuration menu
    Copy the full SHA
    08683f1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a562b1a View commit details
    Browse the repository at this point in the history
  3. Abort if --git-location doesn't contain Git

    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.
    dra27 committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    d96fa34 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    55ef672 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    75282c7 View commit details
    Browse the repository at this point in the history
  6. Change the calculation for installing git

    Rather than filtering git out of the package list, instead add it when
    required.
    dra27 committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    2a03664 View commit details
    Browse the repository at this point in the history
  7. Add OpamCompat.Seq.find_map

    dra27 committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    d4083ae View commit details
    Browse the repository at this point in the history
  8. Overhaul OpamStd.Sys Cygwin functions

    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.
    dra27 committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    610b66a View commit details
    Browse the repository at this point in the history
  9. Detect both Cygwin and MSYS2 os-distribution

    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.
    dra27 committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    857cae8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4f1ca99 View commit details
    Browse the repository at this point in the history
  11. De-label OpamSysInteract.Cygwin.install

    Single argument function with a non-base type.
    dra27 committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    499c9e7 View commit details
    Browse the repository at this point in the history
  12. Expand Cygwin.check_install to analyse_install

    Includes more checks and also returns the kind of installation which was
    found.
    dra27 committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    2337441 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    fa4d39f View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    affdbab View commit details
    Browse the repository at this point in the history
  15. Tweak OpamSysInteract.Cygwin.check_setup more

    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.
    dra27 committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    c0cd8f4 View commit details
    Browse the repository at this point in the history