aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-createbuildenv
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2010-01-02 15:33:06 +0100
committerLoïc Minier <lool@dooz.org>2010-01-02 15:36:38 +0100
commit047b1efbfe6f14a71432e27baa7c55fe7819e219 (patch)
treecafdf42a51bfb3dc8be00171c71ddfa22eef24c0 /pbuilder-createbuildenv
parent2a4fbaea3a1f86ab54f240f6b6d1cc1ac454ef95 (diff)
downloadpbuilder-047b1efbfe6f14a71432e27baa7c55fe7819e219.tar
pbuilder-047b1efbfe6f14a71432e27baa7c55fe7819e219.tar.gz
Only remove/install aptitude on create/update
Only install aptitude in pbuilder-createbuildenv or pbuilder-updatebuildenv, not in pbuilder-satisfydepends-aptitude, and only when $PBUILDERSATISFYDEPENDSCMD uses aptitude. Remove aptitude in pbuilder-createbuildenv and pbuilder-updatebuildenv otherwise; closes: #539578.
Diffstat (limited to 'pbuilder-createbuildenv')
-rwxr-xr-xpbuilder-createbuildenv15
1 files changed, 9 insertions, 6 deletions
diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv
index 1fc3f15..e187e7b 100755
--- a/pbuilder-createbuildenv
+++ b/pbuilder-createbuildenv
@@ -86,18 +86,21 @@ log "I: upgrading packages"
mountproc
$TRAP umountproc_cleanbuildplace_trap exit sighup
$CHROOTEXEC /usr/bin/apt-get -q update
-if [ -n "$REMOVEPACKAGES" ]; then
- $CHROOTEXEC /usr/bin/dpkg --purge $REMOVEPACKAGES
-fi
-recover_aptcache
-$CHROOTEXEC /usr/bin/apt-get -q -y --force-yes "${FORCE_CONFNEW[@]}" dist-upgrade
-case `readlink -e /usr/lib/pbuilder/pbuilder-satisfydepends` in
+case "`readlink -e "$PBUILDERSATISFYDEPENDSCMD"`" in
*-aptitude)
EXTRAPACKAGES="$EXTRAPACKAGES aptitude"
;;
+ *)
+ REMOVEPACKAGES="$REMOVEPACKAGES aptitude"
+ ;;
esac
+if [ -n "$REMOVEPACKAGES" ]; then
+ $CHROOTEXEC /usr/bin/dpkg --purge $REMOVEPACKAGES
+fi
+recover_aptcache
+$CHROOTEXEC /usr/bin/apt-get -q -y --force-yes "${FORCE_CONFNEW[@]}" dist-upgrade
$CHROOTEXEC /usr/bin/apt-get -q -y --force-yes install build-essential dpkg-dev $EXTRAPACKAGES
save_aptcache