aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-updatebuildenv
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2008-01-12 20:03:39 +0100
committerLoïc Minier <lool@dooz.org>2008-01-12 20:03:39 +0100
commit8aa5a3eab6fe2b592d1fa59eb9ac41f1d74462ec (patch)
tree770364448c6e9e7eb65d8a379d8c31f287bbbde6 /pbuilder-updatebuildenv
parentd14b6eefa931e13ae2f96140a19478b688bdfc3e (diff)
downloadpbuilder-8aa5a3eab6fe2b592d1fa59eb9ac41f1d74462ec.tar
pbuilder-8aa5a3eab6fe2b592d1fa59eb9ac41f1d74462ec.tar.gz
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.
Diffstat (limited to 'pbuilder-updatebuildenv')
-rwxr-xr-xpbuilder-updatebuildenv5
1 files changed, 2 insertions, 3 deletions
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