If I try to modify SRC_URI using pn overrides for recipes using BBCLASSEXTEND modified entries are duplicated. If the recipe uses SRCPV bitbake expects SRCREV_FORMAT to be set: ERROR: ExpansionError during parsing /home/frederik/src/git/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb Traceback (most recent call last): File "/home/frederik/src/git/poky/bitbake/lib/bb/data_smart.py", line 808, in DataSmart.getVarFlag(var='PV', flag='_content', expand=True, noweakdefault=False, parsing=False, retparser=False): if expand or retparser: > parser = self.expandWithRefs(value, cachename) if expand: File "/home/frederik/src/git/poky/bitbake/lib/bb/data_smart.py", line 416, in DataSmart.expandWithRefs(s='0.1${SRCPV}', varname='PV'): try: > s = __expand_var_regexp__.sub(varparse.var_sub, s) try: File "/home/frederik/src/git/poky/bitbake/lib/bb/data_smart.py", line 108, in VariableParse.var_sub(match=<_sre.SRE_Match object; span=(3, 11), match='${SRCPV}'>): raise Exception("variable %s references itself!" % self.varname) > var = self.d.getVarFlag(key, "_content") self.references.add(key) File "/home/frederik/src/git/poky/bitbake/lib/bb/data_smart.py", line 808, in DataSmart.getVarFlag(var='SRCPV', flag='_content', expand=True, noweakdefault=False, parsing=False, retparser=False): if expand or retparser: > parser = self.expandWithRefs(value, cachename) if expand: File "/home/frederik/src/git/poky/bitbake/lib/bb/data_smart.py", line 430, in DataSmart.expandWithRefs(s='${@bb.fetch2.get_srcrev(d)}', varname='SRCPV'): except Exception as exc: > raise ExpansionError(varname, s, exc) from exc bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: The SRCREV_FORMAT variable must be set when multiple SCMs are used. Steps to reproduce: echo 'BBCLASSEXTEND += "native" PV_append = "${SRCPV}"' >> meta/recipes-devtools/mmc/mmc-utils_git.bb . ./oe-init-build-env echo 'SRCBRANCH_pn-mmc-utils = "foobar"' >> conf/local.conf bitbake -c fetch mmc-utils
I tried to reproduce this using the steps you detail and couldn't. You mentioned changing SRC_URI but your steps don't include that. The SRCREV_FORMAT error suggests there were two git:// urls in SRC_URI which this bug doesn't show. I'm going to close this as unable to reproduce, if you can provide reproduction steps please reopen. For reference these issues are normally due to referencing S/WORKDIR in SRC_URI. If we need to know SRCREV to know PV to determine S/WORKDIR then that would cause a circular error.