From 5ec9ab68433a52e5db75eac8b7dd9085ae3a1696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tuong?= Date: Fri, 6 Jul 2012 14:34:38 +0200 Subject: [PATCH] [base packages] precision in case we forget to add the "-no-base-packages" ( for instance, see 640a3baf3cd5d5a1ef80f21a65f173a027652b1f ) --- src/client.ml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/client.ml b/src/client.ml index bc18056ba02..d6b7b02109b 100644 --- a/src/client.ml +++ b/src/client.ml @@ -846,6 +846,17 @@ module Heuristic = struct let comp_f = Path.G.compiler t.global ocaml_version in let comp = File.Comp.read comp_f in let available = NV.to_map t.available in + if (* check that all packages in [comp] are in [available] *) + List.fold_left + (fun b -> function + | (name, _), None -> + if N.Map.mem (N.of_string name) available then b else + let _ = Globals.error "Package %s not found" name in + true + | _ -> b) + false + (File.Comp.packages comp) + then Globals.exit 66; List.rev_map (function | (name, _), None ->