-
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?
Conversation
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
| Haiku -> Some (`AsAdmin "pkgman", ["update"]) | |
| Haiku -> Some (`AsUser "pkgman", ["full-sync"]) |
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
| Haiku -> `AsAdmin "pkgman" | |
| Haiku -> `AsUser "pkgman" |
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.
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 su
though so maybe? Do you know where this is documented? I couldn't find if haiku has a notion of superuser/privileged user
run_query_command "pkgman" ["search"; "%n\n%o"] | ||
|> List.map OpamSysPkg.of_string | ||
|> OpamSysPkg.Set.of_list |
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
/--all
but 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 contains s
, S
, h
or H
then it is installed). Or we could wait for #6489 and split the two into pkgman search -a
and pkgman search -i -a
run_query_command "pkgman" ["search"; "%n\n%o"] | |
|> List.map OpamSysPkg.of_string | |
|> OpamSysPkg.Set.of_list | |
run_query_command "pkgman" ["search"; "-a"] | |
|> some_post_processing |
Add missing references to Haiku package manager.