From ccd0c4094bddc7e954c7ca985e1a3b462b334e81 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Wed, 13 Mar 2024 14:33:52 -0600 Subject: xlnx-embeddedsw: Update AUTOREV When using AUTOREV with BB_NO_NETWORK = '1', the system would fail with a circular dependency on a parse error. Adding the skip code, and moving the default value to 'INVALID' will ensure that the user is notified with an appropriate error, and no parse issues occur. Signed-off-by: Mark Hatle --- meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'meta-xilinx-standalone') diff --git a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass index 1e9e3729..d5b8ef82 100644 --- a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass +++ b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass @@ -13,7 +13,7 @@ ESW_REV[git] = "${AUTOREV}" ESW_REV[2023.1] = "af784f742dad0ca6e69e05baf8de51152c396b9a" ESW_REV[2023.2] = "73f0904e41cc109f18bb19a5329d0e5a66af2434" ESW_REV[2024.1] = "ad038fbbeccd66f126ad80980452b8fecee60e4f" -SRCREV ??= "${@d.getVarFlag('ESW_REV', d.getVar('ESW_VER')) or '${AUTOREV}'}" +SRCREV ??= "${@d.getVarFlag('ESW_REV', d.getVar('ESW_VER')) or 'INVALID'}" EMBEDDEDSW_BRANCHARG ?= "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" EMBEDDEDSW_SRCURI ?= "${REPO};${EMBEDDEDSW_BRANCHARG}" @@ -27,3 +27,13 @@ LIC_FILES_CHKSUM ??= "file://license.txt;md5=${@d.getVarFlag('LIC_FILES_CHKSUM', SRC_URI = "${EMBEDDEDSW_SRCURI}" PV .= "+git${SRCPV}" + +python() { + if d.getVar('BB_NO_NETWORK') == '1': + try: + # Just evaluating SRCPV / SRCREV can trigger an exception when BB_NO_NETWORK is enabled. + var = d.getVar('SRCPV') + var = d.getVar('SRCREV') + except: + raise bb.parse.SkipRecipe('BB_NO_NETWORK is enabled, can not fetch SRCREV (%s)' % d.getVar('SRCREV')) +} -- cgit v1.2.3-54-g00ecf