diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:51 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:29 +0100 |
commit | 8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1 (patch) | |
tree | 621dc56a00a65ab0eb1fd4e7d42ad4e45d718741 /helpers/lh_chroot_tasks | |
parent | 4739146fc6c4de8b16418517bb882312c475195c (diff) | |
download | live-build-8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1.zip live-build-8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1.tar.gz |
Adding live-helper 1.0~a7-1.
Diffstat (limited to 'helpers/lh_chroot_tasks')
-rwxr-xr-x | helpers/lh_chroot_tasks | 72 |
1 files changed, 30 insertions, 42 deletions
diff --git a/helpers/lh_chroot_tasks b/helpers/lh_chroot_tasks index 7427e97..64cd47f 100755 --- a/helpers/lh_chroot_tasks +++ b/helpers/lh_chroot_tasks @@ -50,48 +50,36 @@ then # Restoring cache Restore_cache cache/chroot_tasks - if [ ! -f chroot/usr/bin/aptitude ] - then - PACKAGES="${PACKAGES} aptitude" - fi - - if [ ! -f chroot/usr/bin/tasksel ] - then - PACKAGES="${PACKAGES} tasksel" - fi - - if [ -n "${PACKAGES}" ] - then - # Installing symlinks - case "${LH_APT}" in - apt|apt-get) - Chroot "apt-get install --yes ${PACKAGES}" - ;; - - aptitude) - Chroot "aptitude install --assume-yes ${PACKAGES}" - ;; - esac - fi - - for TASK in ${LIVE_TASKS} - do - Chroot "tasksel --debconf-apt-progress --logstderr install ${TASK}" - done - - if [ -n "${PACKAGES}" ] - then - # Removing packages - case "${LH_APT}" in - apt|apt-get) - Chroot "apt-get remove --purge --yes ${PACKAGES}" - ;; - - aptitude) - Chroot "aptitude purge --assume-yes ${PACKAGES}" - ;; - esac - fi + # Checking depends + case "${LH_TASKSEL}" in + aptitude) + Check_package chroot/usr/bin/aptitude aptitude + ;; + + tasksel) + Check_package chroot/usr/bin/tasksel tasksel + ;; + esac + + # Installing depends + Install_package + + # Installing tasks + case "${LH_TASKSEL}" in + aptitude) + Chroot "aptitude install --assume-yes ${LIVE_TASKS}" + ;; + + tasksel) + for TASK in ${LIVE_TASKS} + do + Chroot "tasksel --debconf-apt-progress --logstderr install ${TASK}" + done + ;; + esac + + # Removing depends + Remove_package # Saving cache Save_cache cache/chroot_tasks |