let input_raw parse files =
let timer = Util.Timer.create "Debian.Format822.input_raw" in
Util.Timer.start timer;
if List.length files > 1 then info "Merging repositories" ;
let s =
List.fold_left (fun acc file ->
let ch =
match file with
|"-" -> IO.input_channel stdin
|_ -> Input.open_file file
in
let l = parse file ch in
let _ = Input.close_ch ch in
List.fold_left (fun s x -> Set.add x s) acc l
) Set.empty files
in
info "total packages %n" (Set.cardinal s);
Util.Timer.stop timer (Set.elements s)