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

Depexts: Add support for NetBSD, DragonFlyBSD (+ fix OpenBSD, FreeBSD and Gentoo) #4396

Merged
merged 8 commits into from
Oct 21, 2020

Conversation

kit-ty-kate
Copy link
Member

@kit-ty-kate kit-ty-kate commented Oct 18, 2020

This PR:

  • Adds support for DragonFlyBSD, which use virtually the same package manager as FreeBSD (pkg). For our purpose they behave exactly the same way and have the same required commands so I just merged the two together like it's done for centos/fedora/...
  • Adds support for NetBSD, it seems like pkgin is the default package manager now, the old pkg_add is not even configured by default. It is to be noted that OpenBSD's and NetBSD's pkg_info/pkg_add are two very different software, even if they have the same name.
  • Fixes OpenBSD, FreeBSD and Gentoo with regards to package paths. Packages on those systems come from their "ports collection" system and categorize their packages to prevent name conflicts.
    • On OpenBSD and Gentoo, packages can be installed using the fullpath name or the short one, and fail or ask the user if the short one is requested but another package with the same name exists
    • On FreeBSD it's the same thing, however a prefix or suffix is added to the package name in case of a conflict. For instance, both lang/elm and mail/elm exists but lang/elm becomes hs-elm when "packetized".

Many packages in opam-repository right now have either one of the form (long names or short ones) and as it stands with opam 2.1 the long ones would not be detected on gentoo on freebsd and the short ones would not be detected on openbsd.

Side note: I only tested individual commands on those systems, not opam directly. More testing is needed if we want to ensure this works correctly.

@rjbou rjbou added this to PR in Progress in Opam 2.1.x via automation Oct 20, 2020
@rjbou rjbou added this to the 2.1.0~beta3 milestone Oct 20, 2020
Copy link
Collaborator

@rjbou rjbou left a comment

Choose a reason for hiding this comment

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

Thanks for the fix and new platform! It's a good to go for me!
Agree that it need some tests, if some netbsd/freebsd/openbsd/gentoo people can try this PR, indication are here.
@kit-ty-kate juste some nitpicking :) I try to keep the type and its pattern matching alphabetically ordered, to find more easily a platform when needed, can you move Netbsd before Openbsd. I'd should add a comment about that in the code, something like

(* Please keep this alphabetically ordered, in the type definition,
    and in pattern matching *)
type families =
  | Alpine

Opam 2.1.x automation moved this from PR in Progress to PR Finalised Oct 20, 2020
@rjbou
Copy link
Collaborator

rjbou commented Oct 20, 2020

Unbound value String.rindex_opt for ocaml 4.02.3 (travis)

@rjbou rjbou moved this from PR Finalised to PR in Progress in Opam 2.1.x Oct 20, 2020
@rjbou rjbou moved this from PR in Progress to PR Finalised in Opam 2.1.x Oct 21, 2020
@rjbou rjbou merged commit 1353c0e into ocaml:master Oct 21, 2020
Opam 2.1.x automation moved this from PR Finalised to Done Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Opam 2.1.x
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants