mirror of
https://github.com/tuxbox-neutrino/buildenv.git
synced 2025-08-26 15:02:58 +02:00
init.sh: Refactor image version handling in the build script
- Introduced DEFAULT_IMAGE_VERSION and COMPATIBLE_IMAGE_VERSIONS for flexible version management. - Mapped multiple compatible versions to a single configuration block to avoid duplication. - Ensured IMAGE_VERSION adjusts dynamically based on user input, with validation against COMPATIBLE_IMAGE_VERSIONS. - Streamlined environment variable naming and organized source layer configuration. - Added conditional execution for Python2 layer fetching based on the presence of PYTHON2_SRCREV. This commit improves the script's maintainability and robustness by clarifying version management and optimizing configuration handling.
This commit is contained in:
@@ -345,6 +345,9 @@ function create_local_config () {
|
||||
|
||||
# add layer entries into bblayer.conf
|
||||
set_file_entry $BBLAYER_CONF_FILE "generated" '# auto generated entries by init script'
|
||||
if [[ -z "$PYTHON2_SRCREV" ]]; then
|
||||
PYTHON2_LAYER_NAME=""
|
||||
fi
|
||||
LAYER_LIST=" $TUXBOX_LAYER_NAME $META_MACHINE_LAYER $OE_LAYER_NAME/meta-oe $OE_LAYER_NAME/meta-networking $PYTHON2_LAYER_NAME $QT5_LAYER_NAME "
|
||||
for LL in $LAYER_LIST ; do
|
||||
if set_file_entry $BBLAYER_CONF_FILE $LL 'BBLAYERS += " '$BUILD_ROOT_DIR'/'$LL' "' == 1;then
|
||||
|
Reference in New Issue
Block a user