Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

On debug mode, output the cudf and the package graph of the universe.

  • Loading branch information...
commit ee8e179caac52b18477c830a60f5ddf4393a081b 1 parent d5bcb56
Thomas Gazagnaire samoht authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/opamSolver.ml
11 src/opamSolver.ml
View
@@ -614,6 +614,15 @@ end = struct
end
+let output_universe name universe =
+ if !OpamGlobals.debug then (
+ let oc = open_out (name ^ ".cudf") in
+ Cudf_printer.pp_universe oc universe;
+ close_out oc;
+ let g = Graph.dep_reduction (Cudf.get_packages universe) in
+ Graph.output_graph g name;
+ )
+
let resolve (U l_pkg_pb) req installed =
(* filter-out the default package from the universe *)
let l_pkg_pb =
@@ -659,6 +668,8 @@ let resolve (U l_pkg_pb) req installed =
universe
else (* Universe without optional dependencies *)
universe0 in
+ output_universe "universe-all" universe;
+ output_universe "universe" universe0;
Graph.dep_reduction (Cudf.get_packages ~filter:(fun p -> p.Cudf.installed) universe0),
universe,
resolve universe1 in
Please sign in to comment.
Something went wrong with that request. Please try again.