summaryrefslogtreecommitdiffstats
path: root/src/febootstrap_debian.ml
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-10-18 14:12:21 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-10-18 14:12:21 +0100
commit93598c10650ab7d885b7f497308d05d478eb5e06 (patch)
tree6c4358a84f7b2cc4f787e9f5d9df18c493e8c64b /src/febootstrap_debian.ml
parent1e70cc1d9b1630766431bafe35668c3828df578a (diff)
downloadfebootstrap-93598c10650ab7d885b7f497308d05d478eb5e06.tar.gz
febootstrap-93598c10650ab7d885b7f497308d05d478eb5e06.tar.xz
febootstrap-93598c10650ab7d885b7f497308d05d478eb5e06.zip
debian: Fix Debian package handler when --use-installed not given.
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.
Diffstat (limited to 'src/febootstrap_debian.ml')
-rw-r--r--src/febootstrap_debian.ml10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/febootstrap_debian.ml b/src/febootstrap_debian.ml
index 85c9b7e..0169756 100644
--- a/src/febootstrap_debian.ml
+++ b/src/febootstrap_debian.ml
@@ -62,9 +62,13 @@ let rec debian_resolve_dependencies_and_download names =
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)