Browse files

Remove dead-code

  • Loading branch information...
1 parent a94dfa8 commit 817f9f290e5852b5de33284b57940dd118983ddd @samoht committed Mar 29, 2013
Showing with 0 additions and 23 deletions.
  1. +0 −23 src/solver/opamHeuristic.ml
View
23 src/solver/opamHeuristic.ml
@@ -20,29 +20,6 @@ let log fmt = OpamGlobals.log "HEURISTIC" fmt
type 'a state = 'a list
type 'a state_space = 'a array list
-(* Try to remove a subset of the installed packages from the universe
- and check whether the the resulting universe stays consistent. *)
-let rec minimize_universe minimizable universe =
- log "minimize minimizable=%s" (OpamMisc.StringSet.to_string minimizable);
- if OpamMisc.StringSet.is_empty minimizable then
- universe
- else
- let is_removable universe name =
- let b, r = Cudf_checker.is_consistent (OpamCudf.uninstall universe name) in
- (match r with
- | None -> log "%s is not necessary" name
- | Some r ->
- log "cannot remove %s: %s" name
- (Cudf_checker.explain_reason (r:>Cudf_checker.bad_solution_reason)));
- b in
- let to_remove = OpamMisc.StringSet.filter (is_removable universe) minimizable in
- let minimizable = OpamMisc.StringSet.diff minimizable to_remove in
- if OpamMisc.StringSet.is_empty to_remove then
- universe
- else
- let universe = OpamMisc.StringSet.fold (fun p u -> OpamCudf.uninstall u p) to_remove universe in
- minimize_universe minimizable universe
-
(* Forget about the changes which are not related to the packages we
are interested in. We don't have yet computed the transitive
closure of dependencies: we are processing 'raw' actions which come

0 comments on commit 817f9f2

Please sign in to comment.