mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-next: take a breath: config might mark aggregation required; aggregation requires prepare_host, and thus runs in default-build
This commit is contained in:
@@ -37,7 +37,7 @@ function cli_rootfs_run() {
|
||||
declare -g -r RELEASE="${RELEASE}" # make readonly for finding who tries to change it
|
||||
declare -g -r NEEDS_BINFMT="yes" # make sure binfmts are installed during prepare_host_interactive
|
||||
|
||||
# prep_conf_main_only_rootfs_ni is prep_conf_main_only_rootfs_ni() + aggregate_packages_in_logging_section() .
|
||||
# prep_conf_main_only_rootfs_ni is prep_conf_main_only_rootfs_ni() + mark_aggregation_required_in_default_build_start()
|
||||
prep_conf_main_only_rootfs_ni < /dev/null # no stdin for this, so it bombs if tries to be interactive.
|
||||
|
||||
declare -g -r ARCH="${ARCH}" # make readonly for finding who tries to change it
|
||||
|
||||
@@ -6,6 +6,10 @@ function assert_requires_aggregation() {
|
||||
fi
|
||||
}
|
||||
|
||||
function mark_aggregation_required_in_default_build_start() {
|
||||
declare -i -g -r aggregation_required_in_default_build_start=1 # global, readonly.
|
||||
}
|
||||
|
||||
function aggregate_packages_in_logging_section() {
|
||||
# Aggregate packages, in its own logging section; this decides internally on KERNEL_ONLY=no
|
||||
# We need aggregation to be able to build bsp packages, which contain scripts coming from the aggregation.
|
||||
|
||||
@@ -33,7 +33,8 @@ function prep_conf_main_build_single() {
|
||||
LOG_SECTION="ni_check_basic_host" do_with_logging check_basic_host
|
||||
fi
|
||||
|
||||
aggregate_packages_in_logging_section
|
||||
# can't aggregate here, since it needs a prepared host... mark to do it later.
|
||||
mark_aggregation_required_in_default_build_start
|
||||
|
||||
display_alert "Configuration prepared for BOARD build" "${BOARD}.${BOARD_TYPE}" "info"
|
||||
}
|
||||
@@ -73,7 +74,10 @@ function prep_conf_main_minimal_ni() {
|
||||
# Lean version, for building rootfs, that doesn't need BOARD/BOARDFAMILY; never interactive.
|
||||
function prep_conf_main_only_rootfs_ni() {
|
||||
prep_conf_main_minimal_ni
|
||||
aggregate_packages_in_logging_section
|
||||
|
||||
# can't aggregate here, since it needs a prepared host... mark to do it later.
|
||||
mark_aggregation_required_in_default_build_start
|
||||
|
||||
display_alert "Configuration prepared for minimal+rootfs" "prep_conf_main_only_rootfs_ni" "info"
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,14 @@ function main_default_start_build() {
|
||||
# Prepare ccache, cthreads, etc for the build
|
||||
LOG_SECTION="prepare_compilation_vars" do_with_logging prepare_compilation_vars
|
||||
|
||||
# from mark_aggregation_required_in_default_build_start() possibly marked during config
|
||||
if [[ ${aggregation_required_in_default_build_start:-0} -gt 0 ]]; then
|
||||
display_alert "Configuration requires aggregation" "running aggregation now" "debug"
|
||||
aggregate_packages_in_logging_section
|
||||
else
|
||||
display_alert "Configuration does not require aggregation" "skipping aggregation" "debug"
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user