-
Notifications
You must be signed in to change notification settings - Fork 374
[Haiku] Add missing references to Haiku package manager #6641
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -123,6 +123,7 @@ type families = | |||||
| | Dummy of test_setup | ||||||
| | Freebsd | ||||||
| | Gentoo | ||||||
| | Haiku | ||||||
| | Homebrew | ||||||
| | Macports | ||||||
| | Msys2 | ||||||
|
|
@@ -191,6 +192,7 @@ let family ~env () = | |||||
| end | ||||||
| | "debian" | "ubuntu" -> Debian | ||||||
| | "gentoo" -> Gentoo | ||||||
| | "haiku" -> Haiku | ||||||
| | "homebrew" -> Homebrew | ||||||
| | "macports" -> Macports | ||||||
| | "nixos" -> Nix | ||||||
|
|
@@ -863,6 +865,13 @@ let packages_status ?(env=OpamVariable.Map.empty) config packages = | |||||
| |> package_set_of_pkgpath | ||||||
| in | ||||||
| compute_sets sys_installed | ||||||
| | Haiku -> | ||||||
| let sys_installed = | ||||||
| run_query_command "pkgman" ["search"; "%n\n%o"] | ||||||
| |> List.map OpamSysPkg.of_string | ||||||
| |> OpamSysPkg.Set.of_list | ||||||
| in | ||||||
| compute_sets sys_installed | ||||||
| | Homebrew -> | ||||||
| (* accept 'pkgname' and 'pkgname@version' | ||||||
| exampe output | ||||||
|
|
@@ -1006,7 +1015,7 @@ let stateless_install ?(env=OpamVariable.Map.empty) () = | |||||
| | exception Failure _ -> true (* no depexts *) | ||||||
| | Nix -> true | ||||||
| | Alpine | Altlinux | Arch | Centos | Cygwin | Debian | Dummy _ | ||||||
| | Freebsd | Gentoo | Homebrew | Macports | Msys2 | Netbsd | ||||||
| | Freebsd | Gentoo | Haiku | Homebrew | Macports | Msys2 | Netbsd | ||||||
| | Openbsd | Suse -> false | ||||||
|
|
||||||
| (* Install *) | ||||||
|
|
@@ -1026,6 +1035,7 @@ let package_manager_name_t ?(env=OpamVariable.Map.empty) config = | |||||
| `AsUser "false" | ||||||
| | Freebsd -> `AsAdmin "pkg" | ||||||
| | Gentoo -> `AsAdmin "emerge" | ||||||
| | Haiku -> `AsAdmin "pkgman" | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haiku doesn't seem to have sudo/doas or any sort of distinction between admin and users as far as the package manager is concerned. It has |
||||||
| | Homebrew -> `AsUser "brew" | ||||||
| | Macports -> `AsAdmin "port" | ||||||
| | Msys2 -> `AsUser (Commands.msys2 config) | ||||||
|
|
@@ -1112,6 +1122,7 @@ let install_packages_commands_t ?(env=OpamVariable.Map.empty) ~to_show st | |||||
| [pm, []], None | ||||||
| | Freebsd -> [pm, "install"::yes ["-y"] packages], None | ||||||
| | Gentoo -> [pm, yes ~no:["-a"] [] packages], None | ||||||
| | Haiku -> [pm, "install"::yes ["-y"] packages], None | ||||||
| | Homebrew -> | ||||||
| [pm, "install"::packages], (* NOTE: Does not have any interactive mode *) | ||||||
| Some (["HOMEBREW_NO_AUTO_UPDATE","yes"]) | ||||||
|
|
@@ -1261,6 +1272,7 @@ let update ?(env=OpamVariable.Map.empty) config = | |||||
| if test.install then None else Some (`AsUser "false", []) | ||||||
| | Freebsd -> None | ||||||
| | Gentoo -> Some (`AsAdmin "emerge", ["--sync"]) | ||||||
| | Haiku -> Some (`AsAdmin "pkgman", ["update"]) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| | Homebrew -> Some (`AsUser "brew", ["update"]) | ||||||
| | Macports -> Some (`AsAdmin "port", ["sync"]) | ||||||
| | Msys2 -> Some (`AsUser (Commands.msys2 config), ["-Sy"]) | ||||||
|
|
||||||
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.
This doesn't work at all. I've looked into it and the best we can do seems to be
-a/--allbut we need to extract a list from that (extract the second column after the-----line). We could even extract the list of installed packages this way by looking at the first column (if it containss,S,horHthen it is installed). Or we could wait for #6489 and split the two intopkgman search -aandpkgman search -i -a