diff options
author | Loïc Minier <lool@dooz.org> | 2008-06-27 23:21:56 +0200 |
---|---|---|
committer | Loïc Minier <lool@dooz.org> | 2008-06-27 23:21:56 +0200 |
commit | 02c30150041e8c2b002135ed588c6aa027956fbd (patch) | |
tree | f19015acbf5244fba1540801ed627ce845c2071b | |
parent | e542876b1ca3ca248b5fff817248c2233b1c3f3f (diff) | |
download | pbuilder-02c30150041e8c2b002135ed588c6aa027956fbd.tar pbuilder-02c30150041e8c2b002135ed588c6aa027956fbd.tar.gz |
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.
-rw-r--r-- | 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 } |