let parse_vpkg s =
let parse_aux str =
try
let s = Pcre.exec ~rex:pkg_re str in
let p = Pcre.get_substring s 1 in
try
let c = Pcre.get_substring s 3 in
let v = Pcre.get_substring s 4 in
(p,CudfAdd.cudfop(Some(c,v)))
with Not_found -> (p,None)
with
Not_found -> fatal "Parse error %s\n" str
in List.map parse_aux (Pcre.split ~rex:and_sep_re s)