diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-09-01 10:23:36 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-09-01 10:23:36 +0100 |
commit | e4c7daf8bcdcf094719b3169ed79aece64a933bd (patch) | |
tree | b8def15d39282464b4f1b049289c64d9a795c51f | |
parent | d16bf1551b713d14b5a60aa176ca5c6df3a21fb1 (diff) | |
download | febootstrap-e4c7daf8bcdcf094719b3169ed79aece64a933bd.tar.gz febootstrap-e4c7daf8bcdcf094719b3169ed79aece64a933bd.tar.xz febootstrap-e4c7daf8bcdcf094719b3169ed79aece64a933bd.zip |
debian: Detect apt-cache in configure.
-rw-r--r-- | config.ml.in | 1 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | febootstrap_debian.ml | 5 |
3 files changed, 5 insertions, 2 deletions
diff --git a/config.ml.in b/config.ml.in index a8c008a..fc8fbfe 100644 --- a/config.ml.in +++ b/config.ml.in @@ -23,6 +23,7 @@ let yum = "@YUM@" let rpm = "@RPM@" let yumdownloader = "@YUMDOWNLOADER@" let aptitude = "@APTITUDE@" +let apt_cache = "@APT_CACHE@" let dpkg = "@DPKG@" let pacman = "@PACMAN@" let host_cpu = "@host_cpu@" diff --git a/configure.ac b/configure.ac index 1ba8e99..6f0cdc7 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,7 @@ AC_CHECK_PROG(YUMDOWNLOADER,[yumdownloader],[yumdownloader],[no]) dnl For Debian handler. AC_CHECK_PROG(APTITUDE,[aptitude],[aptitude],[no]) +AC_CHECK_PROG(APT_CACHE,[apt-cache],[apt-cache],[no]) AC_CHECK_PROG(DPKG,[dpkg],[dpkg],[no]) dnl For ArchLinux handler. diff --git a/febootstrap_debian.ml b/febootstrap_debian.ml index 4aa7389..06fcbc3 100644 --- a/febootstrap_debian.ml +++ b/febootstrap_debian.ml @@ -30,11 +30,12 @@ let tmpdir = tmpdir () let debian_detect () = file_exists "/etc/debian_version" && - Config.aptitude <> "no" && Config.dpkg <> "no" + Config.aptitude <> "no" && Config.apt_cache <> "no" && Config.dpkg <> "no" let debian_resolve_dependencies_and_download names = let cmd = - sprintf "apt-cache depends --recurse -i %s | grep -v '^[<[:space:]]'" + sprintf "%s depends --recurse -i %s | grep -v '^[<[:space:]]'" + Config.apt_cache (String.concat " " (List.map Filename.quote names)) in let pkgs = run_command_get_lines cmd in |