If there is no --use-installed option, then it didn't download all the
packages (only the ones not installed). But this failed later when it
tried to unpack the packages that hadn't been downloaded.
Thus download all the packages if !use_installed.
not (List.exists (fun re -> Str.string_match re name 0) excludes)
) pkgs in
- let present_pkgs, download_pkgs = List.partition (
- fun pkg -> List.exists ((=) pkg) (get_installed_pkgs ())
- ) pkgs in
+ let present_pkgs, download_pkgs =
+ if not use_installed then
+ [], pkgs
+ else
+ List.partition (
+ fun pkg -> List.exists ((=) pkg) (get_installed_pkgs ())
+ ) pkgs in
debug "wanted packages (present / download): %s / %s\n"
(String.concat " " present_pkgs)