Make sure disabling ST's flashlayout & partitions work as expected

The current ST's .bbclass files do not really checks if
ENABLE_PARTITIONS_IMAGE and ENABLE_FLASHLAYOUT_CONFIG are unset.
This silently breaks third-party distributions that use
their own partitions layout and root directory structures.

Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
This commit is contained in:
Bumsik Kim 2019-11-12 14:24:41 +09:00 committed by Priouzeau Christophe
parent 8263d32304
commit a081a1e3d3
2 changed files with 5 additions and 1 deletions

View File

@ -120,7 +120,7 @@ FLASHLAYOUT_CONFIGURE_FILES ??= ""
# -----------------------------------------------------------------------------
python __anonymous () {
flashlayout_config = d.getVar('ENABLE_FLASHLAYOUT_CONFIG')
if flashlayout_config:
if flashlayout_config == "1":
# Gather all current tasks
tasks = filter(lambda k: d.getVarFlag(k, "task", True), d.keys())
for task in tasks:

View File

@ -38,6 +38,10 @@ python __anonymous () {
}
image_rootfs_image_clean_task () {
if [ ${ENABLE_PARTITIONS_IMAGE} -ne "1" ]; then
return
fi
for name in ${PARTITIONS_IMAGE};
do
if `echo ${IMAGE_NAME} | grep -q $name` ;