From f76827f9b8a97f1f33c46e3c541d189e87f66b11 Mon Sep 17 00:00:00 2001 From: Etienne Millon Date: Fri, 24 May 2024 13:54:00 +0200 Subject: [PATCH] [3.15] backport #10564 (#10569) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix interpretation of 'exists_if' in META files (#10564) Signed-off-by: Nicolás Ojeda Bär * Add fixes Signed-off-by: Etienne Millon --------- Signed-off-by: Nicolás Ojeda Bär Signed-off-by: Etienne Millon Co-authored-by: Nicolás Ojeda Bär --- doc/changes/10564.md | 3 +++ src/dune_findlib/package0.ml | 2 +- 2 files changed, 4 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 00000000000..541b6bb5dfe --- /dev/null +++ b/doc/changes/10564.md @@ -0,0 +1,3 @@ +- fix interpretation of `exists_if` predicate in `META` files of installed + libraries containing more than one element. (#10564, fixes #10563, @dbuenzli, + @nojb) diff --git a/src/dune_findlib/package0.ml b/src/dune_findlib/package0.ml index 7a443e531a9..99694f61cd0 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