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

depext: Add Altlinux family support #6207

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ users)
## Opamfile

## External dependencies
* Add apt-rpm/ALTLinux family support for depext [#6207 @RiderALT]

## Format upgrade

Expand Down
8 changes: 6 additions & 2 deletions src/state/opamSysInteract.ml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ end
below pattern matching *)
type families =
| Alpine
| Altlinux
| Arch
| Centos
| Cygwin
Expand Down Expand Up @@ -174,6 +175,7 @@ let family ~env () =
| Some family ->
match family with
| "alpine" | "wolfi" -> Alpine
| "altlinux" -> Altlinux
| "amzn" | "centos" | "fedora" | "mageia" | "oraclelinux" | "ol"
| "rhel" -> Centos
| "archlinux" | "arch" -> Arch
Expand Down Expand Up @@ -697,7 +699,7 @@ let packages_status ?(env=OpamVariable.Map.empty) config packages =
compute_sets sys_installed ~sys_available
| Arch ->
compute_sets_for_arch ~pacman:"pacman"
| Centos ->
| Centos | Altlinux ->
(* Output format:
>crypto-policies
>python3-pip-wheel
Expand Down Expand Up @@ -1016,6 +1018,8 @@ let install_packages_commands_t ?(env=OpamVariable.Map.empty) config sys_package
in
match family ~env () with
| Alpine -> [`AsAdmin "apk", "add"::yes ~no:["-i"] [] packages], None
| Altlinux ->
[`AsAdmin "apt-get", "install"::yes ["-qq"; "-yy"] packages], None
| Arch -> [`AsAdmin "pacman", "-Su"::yes ["--noconfirm"] packages], None
| Centos ->
(* TODO: check if they all declare "rhel" as primary family *)
Expand Down Expand Up @@ -1145,7 +1149,7 @@ let update ?(env=OpamVariable.Map.empty) config =
| Arch -> Some (`AsAdmin "pacman", ["-Sy"])
| Centos -> Some (`AsAdmin (Lazy.force yum_cmd), ["makecache"])
| Cygwin -> None
| Debian -> Some (`AsAdmin "apt-get", ["update"])
| Debian | Altlinux -> Some (`AsAdmin "apt-get", ["update"])
| Dummy test ->
if test.install then None else Some (`AsUser "false", [])
| Freebsd -> None
Expand Down
Loading