armbian-next: kernel: cleanup bundle after patching succeeded, not after build success

- for extra gigabytes of space, earlier
This commit is contained in:
Ricardo Pardini
2023-01-17 02:12:20 +01:00
parent 48c0e9acf4
commit f2bd68afde

View File

@@ -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
}