From f2bd68afdee08863c5d0d26a6bbb3ee90f6ac02f Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Tue, 17 Jan 2023 02:12:20 +0100 Subject: [PATCH] armbian-next: kernel: cleanup bundle after patching succeeded, not after build success - for extra gigabytes of space, earlier --- lib/functions/compilation/kernel.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/functions/compilation/kernel.sh b/lib/functions/compilation/kernel.sh index 3751cd368b..255b7c422c 100644 --- a/lib/functions/compilation/kernel.sh +++ b/lib/functions/compilation/kernel.sh @@ -38,6 +38,10 @@ function compile_kernel() { return 0 fi + # patching worked, it's a good enough indication the git-bundle worked; + # let's clean up the git-bundle cache, since the git-bare cache is proven working. + LOG_SECTION="kernel_cleanup_bundle_artifacts" do_with_logging do_with_hooks kernel_cleanup_bundle_artifacts + # re-read kernel version after patching declare version version=$(grab_version "$kernel_work_dir") @@ -59,10 +63,6 @@ function compile_kernel() { LOG_SECTION="kernel_deploy_pkg" do_with_logging do_with_hooks kernel_deploy_pkg - # kernel build worked; let's clean up the git-bundle cache, since the git-bare cache is proven working. - # @TODO: armbian-oleg: clean this earlier, so we save some 2gb on disk _during_ kernel compile, not after - LOG_SECTION="kernel_cleanup_bundle_artifacts" do_with_logging do_with_hooks kernel_cleanup_bundle_artifacts - return 0 }