Skip to contentSkip to conversation

Parsing failure due to recent patch

DISCUSSION Ryan Eatmon 1 participant 1 message May 25, 2023

lore
Share & tools
lore
#0 lore raw

I am seeing a parsing error with the meta-ti layer due to this recent change:

https://git.openembedded.org/openembedded-core/commit/?id=93a09a05d6dde3542587735df0aa2371e79a3bb7

We have the following lines in our files:

KERNEL_LOCALVERSION = "-g${@d.getVar('SRCPV',True).replace('AUTOINC+','')[:10]}"

UBOOT_LOCALVERSION = "-g${@d.getVar('SRCPV',True).replace('AUTOINC+','')[:10]}"

And when that patch is in place we now get this error:

ERROR: ExpansionError during parsing /scratch/builds/arago-master-wip/build/sources/meta-ti/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti-staging_2023.04.bb
Traceback (most recent call last):
File
"/scratch/builds/arago-master-wip/build/sources/bitbake/lib/bb/data_smart.py", line 460, in DataSmart.expandWithRefs(s='${@bb.fetch2.get_srcrev(d)}', varname='SRCPV'):
try:
> s =
__expand_python_regexp__.sub(varparse.python_sub, s)
except SyntaxError as e:
File
"/scratch/builds/arago-master-wip/build/sources/bitbake/lib/bb/data_smart.py", line 150, in VariableParse.python_sub(match=<re.Match object; span=(0, 27), match='${@bb.fetch2.get_srcrev(d)}'>):
self.contains[k].update(parser.contains[k])
> value = utils.better_eval(codeobj,
DataContext(self.d), {'d' : self.d})
return str(value)
File
"/scratch/builds/arago-master-wip/build/sources/bitbake/lib/bb/utils.py", line 434, in better_eval(source=<code object <module> at 0x7f4978634c90, file "Var <SRCPV>", line 1>, locals={'d': <bb.data_smart.DataSmart object at 0x7f49787dc970>}, extraglobals={'d': <bb.data_smart.DataSmart object at 0x7f49787dc970>}):
ctx[g] = extraglobals[g]
> return eval(source, ctx, locals)

File "Var <SRCPV>", line 1, in <module>
File
"/scratch/builds/arago-master-wip/build/sources/bitbake/lib/bb/fetch2/__init__.py", line 784, in get_srcrev(d=<bb.data_smart.DataSmart object at 0x7f49787dc970>, method_name='sortable_revision'):
if not scms:
> raise FetchError("SRCREV was used yet no valid SCM was
found in SRC_URI")

bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: SRCREV was used yet no valid SCM was found in SRC_URI The variable dependency chain for the failure is: SRCPV -> UBOOT_LOCALVERSION -> do_compile

ERROR: Parsing halted due to errors, see error messages above

Any reference to SRCPV in those variables fails due to SRC_URI being cleared by the patch.

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS