extend config validation to all build components
while `lb build` ran the config validation check, spotting invalid configs and stopping with an error, the major build stages if executed directly did not, nor did the component stages. here we move execution of the validation function into the common init function, with an exported variable used to indicate that validation has been performed. thus validation is performed no matter what part of the build system you execute, but only once. Gbp-Dch: Short
This commit is contained in:
parent
7acd1f488f
commit
943c8fb5fe
|
@ -25,6 +25,12 @@ Init_config_data ()
|
||||||
Read_conffiles $(Common_conffiles)
|
Read_conffiles $(Common_conffiles)
|
||||||
Prepare_config
|
Prepare_config
|
||||||
|
|
||||||
|
# Validating config
|
||||||
|
if [ "${CONFIG_VALIDATED}" != "true" ]; then
|
||||||
|
Validate_config
|
||||||
|
export CONFIG_VALIDATED="true"
|
||||||
|
fi
|
||||||
|
|
||||||
# Apt v2.0.1 introduced color support, but it needs to be explicitly enabled.
|
# Apt v2.0.1 introduced color support, but it needs to be explicitly enabled.
|
||||||
# This is done here so that the injection of the option does not get stored in the config file.
|
# This is done here so that the injection of the option does not get stored in the config file.
|
||||||
if [ "${_COLOR_OUT}" = "true" ] && [ "${_COLOR_ERR}" = "true" ]; then
|
if [ "${_COLOR_OUT}" = "true" ] && [ "${_COLOR_ERR}" = "true" ]; then
|
||||||
|
|
|
@ -48,9 +48,6 @@ fi
|
||||||
# Processing arguments and configuration files
|
# Processing arguments and configuration files
|
||||||
Init_config_data "${@}"
|
Init_config_data "${@}"
|
||||||
|
|
||||||
# Validating config
|
|
||||||
Validate_config
|
|
||||||
|
|
||||||
Echo_message "live-build ${LIVE_BUILD_VERSION}"
|
Echo_message "live-build ${LIVE_BUILD_VERSION}"
|
||||||
Echo_message "Building for a ${LB_MODE}/${LB_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE} system"
|
Echo_message "Building for a ${LB_MODE}/${LB_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE} system"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue