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
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.
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=3a737a783cedd128ae8c8b1c4f55642b9a5691ae http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=433cff7297cc60528f003add2b495e218b2d392c