From 31039f29f3d53dedc01015bf0ffb400e69971985 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Tue, 13 Dec 2022 10:28:31 +0000 Subject: [PATCH] webos: webos_image: replace import with addpylib :Release Notes: OE_IMPORTS was replaced with addpylib in bitbake and oe-core :Detailed Notes: Follow: https://git.openembedded.org/bitbake/commit/?id=afb8478d3853f6edf3669b93588314627d617d6b https://git.openembedded.org/openembedded-core/commit/?id=1f56155e91da2030ee0a5e93037c62e1349ba89f :Testing Performed: Only build tested. :QA Notes: No change to image. :Issues Addressed: [WRQ-693] Create GPVB with Yocto 4.2 Mickledore Change-Id: Ibde3e483d9370469b64c64addc6ef1ab1fa9ae4b --- .gitignore | 1 + meta-webos/classes/webos_image.bbclass | 5 ++--- meta-webos/conf/layer.conf | 2 ++ meta-webos/lib/webos/__init__.py | 1 + meta-webos/lib/{ => webos}/verify_ls2_acg.py | 0 5 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 meta-webos/lib/webos/__init__.py rename meta-webos/lib/{ => webos}/verify_ls2_acg.py (100%) diff --git a/.gitignore b/.gitignore index fcecf51f9..50f16f39a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Copyright (c) 2017-2024 LG Electronics, Inc. meta-webos/lib/__pycache__/ +meta-webos/lib/webos/__pycache__/ MCF-PATCHES* diff --git a/meta-webos/classes/webos_image.bbclass b/meta-webos/classes/webos_image.bbclass index e7c50f708..210dec01e 100644 --- a/meta-webos/classes/webos_image.bbclass +++ b/meta-webos/classes/webos_image.bbclass @@ -91,9 +91,8 @@ python verify_acg () { def herror(c, m): oe.qa.handle_error(c, m, d) - import verify_ls2_acg - verify_ls2_acg.handle_error = herror - if not verify_ls2_acg.Verify("${IMAGE_ROOTFS}"): + webos.verify_ls2_acg.handle_error = herror + if not webos.verify_ls2_acg.Verify("${IMAGE_ROOTFS}"): bb.note("LS2 hub config not found, ACG verification skipped") } diff --git a/meta-webos/conf/layer.conf b/meta-webos/conf/layer.conf index 50b723b2c..3ae5b1752 100644 --- a/meta-webos/conf/layer.conf +++ b/meta-webos/conf/layer.conf @@ -50,6 +50,8 @@ META_OE_LAYER ??= "${@'${BBFILE_PATTERN_openembedded-layer}'[1:-1]}" # Prepend scripts to WEBOS_EXTRA_PATH WEBOS_EXTRA_PATH .= "${@'${BBFILE_PATTERN_meta-webos}'[1:] + 'scripts:'}" +addpylib ${LAYERDIR}/lib webos + # Set path to qemu image tests included in this layer QEMUIMAGETESTS := "${COREBASE}/scripts/qemuimage-tests" diff --git a/meta-webos/lib/webos/__init__.py b/meta-webos/lib/webos/__init__.py new file mode 100644 index 000000000..026eb386a --- /dev/null +++ b/meta-webos/lib/webos/__init__.py @@ -0,0 +1 @@ +BBIMPORTS = ["verify_ls2_acg"] diff --git a/meta-webos/lib/verify_ls2_acg.py b/meta-webos/lib/webos/verify_ls2_acg.py similarity index 100% rename from meta-webos/lib/verify_ls2_acg.py rename to meta-webos/lib/webos/verify_ls2_acg.py