From 02c30150041e8c2b002135ed588c6aa027956fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Fri, 27 Jun 2008 23:21:56 +0200 Subject: Pass APT::Install-Recommends=false to gdebi when possible 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 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pbuilder-satisfydepends-gdebi') 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 } -- cgit v1.2.3