Skip to content

Commit

Permalink
Merge pull request #77 from smondet/epel-release-special-case
Browse files Browse the repository at this point in the history
Special case for the `epel-release` yum-package
  • Loading branch information
AltGr authored Oct 17, 2017
2 parents ef20ca3 + 56556ff commit f9758b3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion depext.ml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,16 @@ let install_packages_commands ~interactive distribution packages =
| Some (`Debian | `Ubuntu) ->
["apt-get"::"install"::yes ["-qq"; "-yy"] packages]
| Some (`Centos | `Fedora | `Mageia | `RHEL | `OracleLinux) ->
["yum"::"install"::yes ["-y"] packages;
(* When opem-packages specify the epel-release package, usually it
means that other dependencies require the EPEL repository to be
already setup when yum-install is called. Cf. #70, #76. *)
let epel_release = "epel-release" in
let install_epel =
try [
"yum"::"install"::yes ["-y"] [List.find ((=) epel_release) packages];
] with _ -> [] in
install_epel @
["yum"::"install"::yes ["-y"] (List.filter ((<>) epel_release) packages);
"rpm"::"-q"::packages]
| Some `FreeBSD ->
["pkg"::"install"::packages]
Expand Down

0 comments on commit f9758b3

Please sign in to comment.