From 8aa5a3eab6fe2b592d1fa59eb9ac41f1d74462ec Mon Sep 17 00:00:00 2001 From: Loïc Minier Date: Sat, 12 Jan 2008 20:03:39 +0100 Subject: Set APT::Get::AutomaticRemove=true in upgrade instead of calling autoremove Instead of running "apt-get autoremove", run apt-get dist-upgrade with -o APT::Get::AutomaticRemove=true; this avoids solutions based on checking for the version of APT or outputting an error on older APT, or masking all errors. Also, autoremove happens after the upgrade instead of before. --- pbuilder-updatebuildenv | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pbuilder-updatebuildenv') diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv index 197100e..8b76da8 100755 --- a/pbuilder-updatebuildenv +++ b/pbuilder-updatebuildenv @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -set -e +set -e . /usr/lib/pbuilder/pbuilder-checkparams . /usr/lib/pbuilder/pbuilder-runhooks @@ -38,14 +38,13 @@ loadhooks echo "Refreshing the base.tgz " echo " -> upgrading packages" $CHROOTEXEC /usr/bin/apt-get update -$CHROOTEXEC /usr/bin/apt-get -y autoremove || true if [ -n "$REMOVEPACKAGES" ]; then $CHROOTEXEC /usr/bin/dpkg --purge $REMOVEPACKAGES fi recover_aptcache $TRAP saveaptcache_umountproc_cleanbuildplace_trap exit sighup -$CHROOTEXEC /usr/bin/apt-get -y --force-yes "${FORCE_CONFNEW[@]}" dist-upgrade +$CHROOTEXEC /usr/bin/apt-get -y --force-yes "${FORCE_CONFNEW[@]}" -o "APT::Get::AutomaticRemove=true" dist-upgrade $CHROOTEXEC /usr/bin/apt-get -y --force-yes install build-essential dpkg-dev apt aptitude $EXTRAPACKAGES save_aptcache -- cgit v1.2.3