From 4f436b493216046d6e77eeb486a6e91d13ba887f Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Tue, 28 Jan 2014 00:49:01 +0000 Subject: [PATCH 1/1] added $DPKG_OPTIONS to all instances of apt-get and aptitude (attempt 2) https://github.com/grml/grml-debootstrap/issues/8 --- chroot-script | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/chroot-script b/chroot-script index 28684dd..bbc91f0 100755 --- a/chroot-script +++ b/chroot-script @@ -18,19 +18,19 @@ # use aptitude only if it's available if [ -x /usr/bin/aptitude ] ; then - APTUPDATE='aptitude update' + APTUPDATE="aptitude update $DPKG_OPTIONS" # Debian ISOs do not contain signed Release files if [ -n "$ISO" ] ; then APTINSTALL="aptitude -y --allow-untrusted --without-recommends install $DPKG_OPTIONS" - APTUPGRADE='aptitude -y --allow-untrusted safe-upgrade' + APTUPGRADE="aptitude -y --allow-untrusted safe-upgrade $DPKG_OPTIONS" else APTINSTALL="aptitude -y --without-recommends install $DPKG_OPTIONS" - APTUPGRADE='aptitude -y safe-upgrade' + APTUPGRADE="aptitude -y safe-upgrade $DPKG_OPTIONS" fi else APTINSTALL="apt-get --force-yes -y --no-install-recommends install $DPKG_OPTIONS" - APTUPDATE='apt-get update' - APTUPGRADE='apt-get --force-yes -y upgrade' + APTUPDATE="apt-get update $DPKG_OPTIONS" + APTUPGRADE="apt-get --force-yes -y upgrade $DPKG_OPTIONS" fi if [ -z "$STAGES" ] ; then @@ -136,9 +136,9 @@ grmlrepos() { EOF fi - if apt-get update ; then - apt-get -y --allow-unauthenticated install grml-debian-keyring - apt-get update + if apt-get update $DPKG_OPTIONS; then + apt-get -y --allow-unauthenticated install grml-debian-keyring $DPKG_OPTIONS + apt-get update $DPKG_OPTIONS else # make sure we have the keys available for aptitude gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 @@ -234,7 +234,7 @@ upgrade_system() { remove_apt_cache() { if [ "$RM_APTCACHE" = 'yes' ] ; then echo "Cleaning apt cache." - apt-get clean + apt-get clean $DPKG_OPTIONS else echo "Not cleaning apt cache as \$RM_APTCACHE is unset." fi -- 2.1.4