From 8a3a03215ea718cc5a6e335c1a96e543ccd09042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Thu, 23 May 2024 21:17:25 +0200 Subject: [PATCH] Fix interpretation of 'exists_if' in META files (#10564) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ojeda Bär --- doc/changes/10564.md | 2 ++ src/dune_findlib/package0.ml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 doc/changes/10564.md diff --git a/doc/changes/10564.md b/doc/changes/10564.md new file mode 100644 index 000000000000..3a9bae84219a --- /dev/null +++ b/doc/changes/10564.md @@ -0,0 +1,2 @@ +- fix interpretation of `exists_if` predicate in `META` files of installed + libraries containing more than one element. (#10564, @dbuenzli, @nojb) diff --git a/src/dune_findlib/package0.ml b/src/dune_findlib/package0.ml index 7a443e531a9a..99694f61cd04 100644 --- a/src/dune_findlib/package0.ml +++ b/src/dune_findlib/package0.ml @@ -56,7 +56,7 @@ let exists t ~is_builtin = let exists_if = Vars.get_words t.vars "exists_if" Ps.empty in match exists_if with | _ :: _ -> - Memo.List.for_all exists_if ~f:(fun fn -> Fs.file_exists (Path.relative t.dir fn)) + Memo.List.exists exists_if ~f:(fun fn -> Fs.file_exists (Path.relative t.dir fn)) | [] -> if not is_builtin then Memo.return true