let is_installed pkg = try match String.nsplit (assoc "status" pkg.extras) " " with |[_;_;"installed"] -> true | _ -> false with Not_found -> false