From 238ae93f4194dd6c43a146cb4e8d87825a4702f0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 11 Jun 2011 16:36:44 +0200 Subject: Allow to optionally run package installation in two passes. Eventually, this allows to have media containing a 'bigger' live system that what they end up installing (Closes: #627439). --- scripts/build/lb_chroot_local-tasklists | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'scripts/build/lb_chroot_local-tasklists') diff --git a/scripts/build/lb_chroot_local-tasklists b/scripts/build/lb_chroot_local-tasklists index 98bf353ac..2eef3553a 100755 --- a/scripts/build/lb_chroot_local-tasklists +++ b/scripts/build/lb_chroot_local-tasklists @@ -16,7 +16,10 @@ set -e # Setting static variables DESCRIPTION="$(Echo 'install local task lists into chroot')" HELP="" -USAGE="${PROGRAM} [--force]" +USAGE="${PROGRAM} {install|live} [--force]" + +_PASS="${1}" +shift Arguments "${@}" @@ -24,13 +27,13 @@ Arguments "${@}" Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source Set_defaults -Echo_message "Begin installation of local task lists..." +Echo_message "Begin installation of local task lists (${_PASS} pass)..." # Requiring stage file Require_stagefile .stage/config .stage/bootstrap # Checking stage file -Check_stagefile .stage/chroot_local-tasklists +Check_stagefile .stage/chroot_local-tasklists.${_PASS} # Checking lock file Check_lockfile .lock @@ -38,13 +41,17 @@ Check_lockfile .lock # Creating lock file Create_lockfile .lock -if ls config/chroot_local-tasklists/*.list > /dev/null 2>&1 +if ls config/chroot_local-tasklists/*.list > /dev/null 2>&1 || \ + ls config/chroot_local-tasklists/*.list.${_PASS} > /dev/null 2>&1 then - for LIST in config/chroot_local-tasklists/*.list + for LIST in config/chroot_local-tasklists/*.list config/chroot_local-tasklists/*.list.${_PASS} do - # Generating local task list - Expand_packagelist "$(basename ${LIST})" "config/chroot_local-tasklists" \ - >> chroot/root/chroot_tasks + if [ -e "${LIST}" ] + then + # Generating local task list + Expand_packagelist "$(basename ${LIST})" "config/chroot_local-tasklists" \ + >> chroot/root/chroot_tasks + fi done # Restoring cache @@ -137,5 +144,5 @@ then Save_cache cache/packages_chroot # Creating stage file - Create_stagefile .stage/chroot_local-tasklists + Create_stagefile .stage/chroot_local-tasklists.${_PASS} fi -- cgit v1.2.3