let collect results d = 
  let add h k v =
    try let l = ResultHash.find h k in l := v :: !l
    with Not_found -> ResultHash.add h k (ref [v])
  in
  match d with 
  |{result = Failure (f) ; request = Package r } -> 
      List.iter (fun reason ->
        match reason with
        |Conflict (i,j,_) ->
            add results.summary reason r;
            results.conflict <- results.conflict + 1
        |Missing (i,vpkgs) ->
            add results.summary reason r;
            results.missing <- results.missing + 1
        |-> ()
      ) (f ())
  |_  -> ()