diff options
author | Daniel Baumann <daniel@debian.org> | 2008-02-21 20:03:57 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2008-02-21 20:03:57 +0100 |
commit | fa3c63f5dc0627ae8618d10ed38c1006b1fff948 (patch) | |
tree | 93f74f348b4bb727f53393a42177a86a965d5d54 /helpers/lh_chroot_sources | |
parent | 20ffe176ede048996d03d838b3d11a8a9ec125cc (diff) | |
download | vyos-live-build-fa3c63f5dc0627ae8618d10ed38c1006b1fff948.tar.gz vyos-live-build-fa3c63f5dc0627ae8618d10ed38c1006b1fff948.zip |
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-x | helpers/lh_chroot_sources | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources index 25713a150..6cb0b3ea5 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 |