From 8114c96399dbf1ab084c5c1e4aa1374002922914 Mon Sep 17 00:00:00 2001 From: Kate Date: Wed, 17 Nov 2021 22:43:27 +0000 Subject: [PATCH] Make the revdeps counter more accurate of actual (recent) use --- opam-health-check.opam | 1 + server/backend/check.ml | 5 +++-- server/backend/dune | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/opam-health-check.opam b/opam-health-check.opam index 3e91ec5..6a47a65 100644 --- a/opam-health-check.opam +++ b/opam-health-check.opam @@ -16,6 +16,7 @@ depends: [ "cohttp-lwt" "cohttp-lwt-unix" "containers" {>= "3.4"} + "ocaml-version" "opam-core" "opam-format" "mirage-crypto-pk" {>= "0.7.0"} diff --git a/server/backend/check.ml b/server/backend/check.ml index f28a17a..57f9751 100644 --- a/server/backend/check.ml +++ b/server/backend/check.ml @@ -297,8 +297,9 @@ module Pkg_set = Set.Make (String) let revdeps_script pkg = let pkg = Filename.quote pkg in - {|opam list --color=never -s --recursive --depopts --depends-on |}^pkg^{| && \ - opam list --color=never -s --with-test --with-doc --depopts --depends-on |}^pkg + let latest_ocaml = Ocaml_version.to_string Ocaml_version.Releases.latest in + {|opam list --color=never -s --recursive --depopts --depends-on |}^pkg^{| --coinstallable-with ocaml.|}^latest_ocaml^{| && \ + opam list --color=never -s --with-test --with-doc --depopts --depends-on |}^pkg^{| --coinstallable-with ocaml.|}^latest_ocaml let get_metadata ~debug ~jobs ~cap ~conf ~pool ~stderr logdir (_, base_obuilder) pkgs = let get_revdeps ~base_obuilder ~pkgname ~pkg ~logdir = diff --git a/server/backend/dune b/server/backend/dune index 3e035b5..e5b6179 100644 --- a/server/backend/dune +++ b/server/backend/dune @@ -16,6 +16,7 @@ containers oca_server opam-core + ocaml-version opam-format obuilder-spec ocluster-api