| Summary: | bb.fetch2.get_srcrev ExpansionError with ;subdir=${S} SRC_URIs | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Mikko Ylinen <mikko.ylinen> |
| Component: | bitbake | Assignee: | Richard Purdie <richard.purdie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | freebendy, poky.bs.watcher, poky.watcher, randy.macleod |
| Version: | unspecified | ||
| Target Milestone: | 4.99 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
Adding ;subdir=${S} to psplash_git.bb is enough to reproduce this. The issue is that:
SRC_URI = "${S}"
S = "${WORKDIR}"
WORKDIR = "xxx/${PV}"
PV = "${SRCPV}"
SRCPV = "${@bb.fetch2.get_srcrev(d)}"
and get_srcrev(d) will expand SRC_URI.
So the code is correct, recursion is occurring and there are circular references.
(In reply to comment #1) > Adding ;subdir=${S} to psplash_git.bb is enough to reproduce this. The issue > is that: > > SRC_URI = "${S}" > S = "${WORKDIR}" > WORKDIR = "xxx/${PV}" > PV = "${SRCPV}" > SRCPV = "${@bb.fetch2.get_srcrev(d)}" > > and get_srcrev(d) will expand SRC_URI. > > So the code is correct, recursion is occurring and there are circular > references. It could be reproduced also when using "destsuffix". Patches sent to make recursion errors more understandable and detect the fetcher special case variable self references. |
When adding ${SRCPV} to PV with SRC_URIs that use "subdir=${S}", bitbake errors with ExpansionError: bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception RuntimeError: maximum recursion depth exceeded