let init_pool_univ ~global_constraints univ =
  let size = (Cudf.universe_size univ) + 1 in
  (* the last element of the array *)
  let globalid = size - 1 in
  let keep = Hashtbl.create 200 in
  let pool = 
    (* here I initalize the pool to size + 1, that is I reserve one spot
     * to encode the global constraints associated with the universe.
     * However, since they are global, I've to add the at the end, after
     * I have analyzed all packages in the universe. *)

    Array.init size (fun uid ->
      if uid = globalid then ([],[]) else (* the last index *)
        let pkg = Cudf.package_by_uid univ uid in
        let dll = 
          List.map (fun vpkgs ->
            (vpkgs, CudfAdd.resolve_vpkgs_int univ vpkgs)
          ) pkg.Cudf.depends 
        in
        let cl = 
          List.map (fun vpkg ->
            (vpkg, CudfAdd.resolve_vpkg_int univ vpkg)
          ) pkg.Cudf.conflicts
        in
        if pkg.Cudf.keep = `Keep_package then
          CudfAdd.add_to_package_list keep pkg.Cudf.package uid;
        (dll,cl)
    )
  in
  if global_constraints then begin
    let keep_dll =
      Hashtbl.fold (fun name {contents = l} acc ->
        ([(name,None)],l) :: acc
      ) keep []
    in
    (* here in theory we could encode more complex contraints .
     * for the moment we consider only `Keep_package *)

    pool.(globalid) <- (keep_dll,[])
  end;
  CudfPool pool