From ed388822192bf8c8af752656ae3b4fdcf5b12772 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Tue, 24 May 2022 12:43:36 +1200 Subject: [PATCH] auto/config: preserve germinate-output directory when removing config Germinate doesn't take very long at all to run but downloading the indices it operates on can take a while and nothing else in auto/config does so not doing it every time you run "lb config" can be a real time saver. The code that invokes germinate already checked if the output was already there but it was unconditionally deleted by the time control got to that point. --- debian/changelog | 7 +++++++ live-build/auto/config | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e4b6c681..2f476709 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.765) UNRELEASED; urgency=medium + + * auto/config: preserve germinate-output directory when removing config to + speed up local iteration. + + -- Michael Hudson-Doyle Tue, 24 May 2022 12:42:10 +1200 + livecd-rootfs (2.764) jammy; urgency=medium [ MichaƂ Sawicz ] diff --git a/live-build/auto/config b/live-build/auto/config index e223954e..27b8ce10 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -1,7 +1,14 @@ #! /bin/sh set -e -rm -rf config +if [ -e config/germinate-output ]; then + mv -T config/germinate-output germ-tmp + rm -rf config + mkdir config + mv -T germ-tmp config/germinate-output +else + rm -rf config +fi echo "Building on $(hostname --fqdn)"