]> code.ossystems Code Review - openembedded-core.git/commit
recipetool: Fix circular reference in SRC_URI
authorSaul Wold <Saul.Wold@windriver.com>
Thu, 3 Feb 2022 19:43:48 +0000 (11:43 -0800)
committerAnuj Mittal <anuj.mittal@intel.com>
Tue, 15 Feb 2022 04:34:13 +0000 (12:34 +0800)
commit5e5874d9b8f954771edb4ee3725bb31c1c5a70f2
tree65d18fa407cd07a330f7ab38574309553d4f3b95
parentd5bdff460cc8b0f38177f1f38d625eeda729b459
recipetool: Fix circular reference in SRC_URI

When creating a new recipe.bb file for a binary, don't use BP which
includes the version information, instead use BPN which is just the
name base Package Name.

Since PB is not specified, it takes the default:
PV = "1.0+git${SRCPV}"

But SRCPV is defined in terms of the SRC_URI, which leads to infinite
recursion (traceback below). Here are the pertinent variables which
cause the recursion:

SRC_URI = "git://github.com/lvc/abi-dumper;protocol=https;subdir=${BP}"
BP = "${BPN}-${PV}"
PV = "1.0+git${SRCPV}"
SRCPV = "${@bb.fetch2.get_srcrev(d)}"

def get_srcrev(d, method_name='sortable_revision'):
    # ... trimmed
    scms = []
    fetcher = Fetch(d.getVar('SRC_URI').split(), d)
    # ... trimmed

[YOCTO #14040]

Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3b8d43fc53ee13d39abc3b2a1f706a97fcf752aa)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
scripts/lib/recipetool/create.py