[PATCH] Pass APT::Install-Recommends=false to gdebi when possible

Loïc Minier lool at dooz.org
Fri Jun 27 21:21:56 UTC 2008


Check whether gdebi support the --version flag and that the version is
>= 0.3.9 in which case pass -o APT::Install-Recommends=false to gdebi.
---
 pbuilder-satisfydepends-gdebi |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/pbuilder-satisfydepends-gdebi b/pbuilder-satisfydepends-gdebi
index 5dbe433..6e3ae06 100644
--- a/pbuilder-satisfydepends-gdebi
+++ b/pbuilder-satisfydepends-gdebi
@@ -24,7 +24,14 @@ set -e
 
 function checkbuilddep_internal () {
     $CHROOTEXEC apt-get -y --force-yes install gdebi-core
-    INSTALL=$($CHROOTEXEC /usr/bin/gdebi --quiet --apt-line $DEBIAN_CONTROL)
+    NO_RECOMMENDS=""
+    if VERSION=$($CHROOTEXEC /usr/bin/gdebi --version 2>/dev/null); then
+        if dpkg --compare-versions $VERSION ge 0.3.9; then
+            NO_RECOMMENDS="-o APT::Install-Recommends=false"
+        fi
+    fi
+
+    INSTALL=$($CHROOTEXEC /usr/bin/gdebi --quiet --apt-line $NO_RECOMMENDS $DEBIAN_CONTROL)
     $CHROOTEXEC /usr/bin/apt-get install -y --force-yes $INSTALL
 }
 
-- 
1.5.6.3


--1yeeQ81UyVL57Vl7
Content-Type: text/x-diff; charset=iso-2022-jp
Content-Disposition: attachment; filename="0012-updated-japanese-documentation-ja.po.patch"



More information about the Pbuilder-maint mailing list