From 7907544390b9a552ba90478249497e0b47a17938 Mon Sep 17 00:00:00 2001 From: Robert C Jennings Date: Tue, 30 Apr 2019 07:48:25 -0500 Subject: [PATCH] ubuntu-cpc: parallel builds: build hooks during config * Use series files with dependency handling to generate hook symlinks dynamically This patch currently only applies to the "ubuntu-cpc" project. More and more logic has been going into the hook scripts to decide under which conditions they should run or not. As we are moving to parallelized builds of image sets, this will get even more complicated. Base hooks will have to know which image sets they belong to and modification of the dependency chain between scripts will become more complicated and prone to errors, as the number of image sets grows. This patch, and prior, introduce explicit ordering and dependency handling for scripts through the use of `series` files and an explicit syntax for dependency specification. --- live-build/auto/config | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/live-build/auto/config b/live-build/auto/config index f29a63e0..43aa40d8 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -1053,6 +1053,19 @@ EOF ubuntu-touch:*|ubuntu-touch-custom:*|ubuntu-core:system-image|ubuntu-desktop-next:system-image|ubuntu-cpc:*|ubuntu-server:live) cp -af /usr/share/livecd-rootfs/live-build/${PROJECT}/* \ config/ + + if [ "$PROJECT" = "ubuntu-cpc" ]; then + case ${IMAGE_TARGETS:-} in + "") + config/hooks.d/make-hooks --hooks-dir config/hooks all + ;; + *) + config/hooks.d/make-hooks --hooks-dir config/hooks \ + "$IMAGE_TARGETS" + ;; + esac + fi + if [ "$IMAGEFORMAT" = none ]; then rm -f config/hooks/*.binary* fi