From 047b1efbfe6f14a71432e27baa7c55fe7819e219 Mon Sep 17 00:00:00 2001 From: Loïc Minier Date: Sat, 2 Jan 2010 15:33:06 +0100 Subject: 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. --- pbuilder-createbuildenv | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'pbuilder-createbuildenv') 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 -- cgit v1.2.3