Permalink
Browse files

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

  • Loading branch information...
1 parent d5bcb56 commit ee8e179caac52b18477c830a60f5ddf4393a081b @samoht samoht committed Oct 10, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 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

0 comments on commit ee8e179

Please sign in to comment.