let parse_input ?(options=None) urilist =
let filelist = List.map (List.map Input.parse_uri) urilist in
match Input.guess_format urilist, options with
|Url.Cudf, None -> cudf_parse_input filelist
|Url.Deb, None -> deb_parse_input Debian.Debcudf.default_options filelist
|Url.Eclipse, None -> eclipse_parse_input Debian.Debcudf.default_options filelist
|Url.Deb, Some (Deb opt) -> deb_parse_input opt filelist
|Url.Eclipse, Some (Eclipse opt) -> eclipse_parse_input opt filelist
|Url.Csw, None -> csw_parse_input filelist
|Url.Hdlist, None ->
IFDEF HASRPM THEN
let dll =
List.map (fun l ->
let filelist = List.map unpack l in
Rpm.Packages.Hdlists.input_raw filelist
) filelist
in
rpm_load_list dll
ELSE
fatal "hdlist Not supported. re-configure with --with-rpm"
END
|Url.Synthesis, None ->
IFDEF HASRPM THEN
let dll =
List.map (fun l ->
let filelist = List.map unpack l in
Rpm.Packages.Synthesis.input_raw filelist
) filelist
in
rpm_load_list dll
ELSE
fatal "synthesis input format not supported. re-configure with --with-rpm"
END
|s,_ -> fatal "%s Not supported" (Url.scheme_to_string s)