From e22bd27170bba862239c41ebdd9a6f23ef865caf Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Wed, 1 Apr 2020 05:22:39 +0100 Subject: add bulk chroot preparation script execution helper rather than explicitly running one helper after another in the major build stages, or by hand (e.g. while testing things during development), they can be run in bulk via this new helper. it essentially just takes a list of helpers to run and runs them one by one. it supports running all helpers except chroot_archives because that one has different parameter requirements to the rest and supporting it would make things messier. helper scripts can either be named by their full script name or without the 'chroot_' prefix for brevity. you can also just specify 'all' to refer to all helpers (except chroot_archives, per above). it automatically reverses the order of the list when run in remove mode. Gbp-Dch: Short --- scripts/build/source | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'scripts/build/source') diff --git a/scripts/build/source b/scripts/build/source index 7e03c337c..9fe0dc8e0 100755 --- a/scripts/build/source +++ b/scripts/build/source @@ -32,10 +32,10 @@ fi # Setting up cleanup function Setup_clean_exit +CHROOT_PREP="hosts resolv hostname" + # Configuring chroot (enabling networking) -lb chroot_hosts install "${@}" -lb chroot_resolv install "${@}" -lb chroot_hostname install "${@}" +lb chroot_prep install "${CHROOT_PREP}" "${@}" lb chroot_archives source install "${@}" # Preparing images @@ -52,8 +52,6 @@ lb source_hdd "${@}" # Deconfiguring chroot lb chroot_archives source remove "${@}" -lb chroot_hostname remove "${@}" -lb chroot_resolv remove "${@}" -lb chroot_hosts remove "${@}" +lb chroot_prep remove "${CHROOT_PREP}" "${@}" Echo_message "Source stage completed" -- cgit v1.2.3