summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_sources
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2008-02-21 20:03:57 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:36:05 +0100
commit09f88a6e3837f71343dacb1bf7c6411183cca2cf (patch)
tree93f74f348b4bb727f53393a42177a86a965d5d54 /helpers/lh_chroot_sources
parent1ffce292fb24b3e77605a76e2388172927bebae7 (diff)
downloadlive-build-09f88a6e3837f71343dacb1bf7c6411183cca2cf.zip
live-build-09f88a6e3837f71343dacb1bf7c6411183cca2cf.tar.gz
Adding apt/aptitude options.
By using APT_OPTIONS and APTITUDE_OPTIONS in config/common, one can manipulate the default options wich is made to each and every apt and aptitude call.
Diffstat (limited to 'helpers/lh_chroot_sources')
-rwxr-xr-xhelpers/lh_chroot_sources38
1 files changed, 11 insertions, 27 deletions
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index 25713a1..6cb0b3e 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -122,7 +122,7 @@ case "${1}" in
if [ "${LH_APT}" = "aptitude" ] && [ ! -x /usr/bin/aptitude ]
then
- Chroot "apt-get install --yes --force-yes aptitude"
+ Chroot "apt-get ${APT_OPTIONS} install aptitude"
fi
else # Get fresh indices
# Check local gpg keys
@@ -148,29 +148,20 @@ case "${1}" in
fi
# Installing aptitude
- if [ "${LH_APT}" = "apt" ] || [ "${LH_APT}" = "apt-get" ]
- then
- Chroot "apt-get update"
- Chroot "apt-get --yes upgrade"
- Chroot "apt-get --yes dist-upgrade"
- elif [ "${LH_APT}" = "aptitude" ]
+ if [ "${LH_APT}" = "aptitude" ] && [ ! -x /usr/bin/aptitude ]
then
- if [ ! -x /usr/bin/aptitude ]
- then
- Chroot "apt-get update"
- Chroot "apt-get install --yes --force-yes aptitude"
- fi
-
- Chroot "aptitude update"
- Chroot "aptitude --assume-yes upgrade"
- Chroot "aptitude --assume-yes dist-upgrade"
+ Chroot "apt-get ${APT_OPTIONS} update"
+ Chroot "apt-get ${APT_OPTIONS} install aptitude"
fi
+ Apt upgrade
+ Apt dist-upgrade
+
# Installing keyring packages
if [ -n "${LH_KEYRING_PACKAGES}" ]
then
- Chroot "apt-get install --yes --force-yes ${LH_KEYRING_PACKAGES}"
- Chroot "apt-get update"
+ Apt --force-yes install "${LH_KEYRING_PACKAGES}"
+ Apt update
fi
if [ "${LH_CACHE_INDICES}" = "enabled" ]
@@ -262,15 +253,8 @@ case "${1}" in
done
fi
- case "${LH_APT}" in
- apt|apt-get)
- Chroot "apt-get update"
- ;;
-
- aptitude)
- Chroot "aptitude update"
- ;;
- esac
+ # Updating indices
+ Apt update
fi
# Cleaning apt packages cache