Bug 13448 - bitbake master appears to expand variables it should not need to
Summary: bitbake master appears to expand variables it should not need to
Status: RESOLVED NOTABUG
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 0.0.0
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.4 M3
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-07-23 04:09 UTC by Paul Eggleton
Modified: 2021-08-03 12:11 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2019-07-23 04:09:34 UTC
If you add meta-iota to your configuration ( https://github.com/bernardoaraujor/meta-iota ) in master, you get a parse failure:

--------- snip ---------
WARNING: /data/poky/meta-iota/recipes-iota/ciri/ciri_0.1.0.bb: Exception during build_dependencies for AUTOREV                                                                                                                  | ETA:  --:--:--
WARNING: /data/poky/meta-iota/recipes-iota/ciri/ciri_0.1.0.bb: Error during finalise of /data/poky/meta-iota/recipes-iota/ciri/ciri_0.1.0.bb
ERROR: ExpansionError during parsing /data/poky/meta-iota/recipes-iota/ciri/ciri_0.1.0.bb                                                                                                                                        | ETA:  0:00:34
Traceback (most recent call last):
  File "Var <SRCPV>", line 1, in <module>
  File "/data/poky/bitbake/lib/bb/fetch2/__init__.py", line 768, in get_srcrev(d=<bb.data_smart.DataSmart object at 0x7f8644d7eac8>, method_name='sortable_revision'):
             raise FetchError("The SRCREV_FORMAT variable must be set when multiple SCMs are used.\n"\
    >                         "The SCMs are:\n%s" % '\n'.join(scms))
     
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.
The SCMs are:
git://github.com/iotaledger/entangled;branch=develop;name=entangled
git://github.com/iotaledger/snapshots.git;name=snapshots;destsuffix=snapshots


Summary: There were 4 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
--------- snip ---------

In warrior the recipe parses fine - note that currently as of seeing this issue the recipe does not actually reference SRCPV:
 https://github.com/bernardoaraujor/meta-iota/blob/master/recipes-iota/ciri/ciri_0.1.0.bb
Comment 1 Richard Purdie 2021-08-03 12:11:46 UTC
It is a bit tricky reproducing this issue now time has passed. Revision 9c320fd577f82cf089b1be652dac3611955e3a27 of meta-iota with zeus does reproduce. For history, the recipe has:

SRC_URI = " \
            git://github.com/iotaledger/entangled;branch=develop;name=entangled \
	    git://github.com/iotaledger/snapshots.git;name=snapshots;destsuffix=snapshots \
"

SRCREV_entangled = "7746ae0f905ae8e54a68869558d14285a2d1aaf7"
SRCREV_snapshots = "${AUTOREV}"

i.e. it is using AUTOREV but doesn't appear to reference SRCPV. In fact it does via bitbake.conf which sets:

AUTOREV[vardepvalue] = "${SRCPV}"

This requirement was added in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=3ab6e17ffeabc7c82d35ab2c01a85b6286ddfa34 and although this is in warrior, I suspect there were bitbake bugs meaning it wasn't being correctly handled.