SHA256
1
0
forked from pool/supermin
supermin/0011-debian-Experiment-with-different-options-for-apt-cac.patch

38 lines
1.5 KiB
Diff

From 67194fc1feac8c99aeafb49ae92ab1996c320312 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 11 Apr 2013 23:20:37 +0100
Subject: debian: Experiment with different options for 'apt-cache depends'.
However this commit does not change the current situation.
---
src/supermin_debian.ml | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/supermin_debian.ml b/src/supermin_debian.ml
index d0bcce8..da75c90 100644
--- a/src/supermin_debian.ml
+++ b/src/supermin_debian.ml
@@ -43,10 +43,20 @@ let get_installed_pkgs () =
| [] -> assert false
| pkgs -> pkgs
+(* Select which dependencies will be installed. See apt-cache(8) for
+ * complete details. Using "-i" means only Depends and Pre-depends
+ * are installed, which is stricter (fewer packages) than ordinary
+ * 'apt-get install'. Otherwise, enable everything, then selectively
+ * disable what you don't want, to make it behave more like
+ * 'apt-get install'.
+ *)
+let which_dependencies = "-i"
+(*let which_dependencies = "--no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances"*)
+
let rec debian_resolve_dependencies_and_download names =
let cmd =
- sprintf "%s depends --recurse -i %s | grep -v '^[<[:space:]]' | grep -Ev ':\\w+\\b'"
- Config.apt_cache
+ sprintf "%s depends --recurse %s %s | grep -v '^[<[:space:]]' | grep -Ev ':\\w+\\b'"
+ Config.apt_cache which_dependencies
(String.concat " " (List.map Filename.quote names)) in
let pkgs = run_command_get_lines cmd in
let pkgs =