summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create.py
diff options
context:
space:
mode:
authorSaul Wold <Saul.Wold@windriver.com>2022-02-03 11:43:48 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-05 17:46:05 +0000
commit254fbcf614cd57d5a5d4ca36b9765b463eaaf10f (patch)
tree5a43be9ab0603461581b07469b4c5b857a7ac572 /scripts/lib/recipetool/create.py
parent5c4a3854266969b69bbfa0988cb6feaea1deb383 (diff)
downloadpoky-254fbcf614cd57d5a5d4ca36b9765b463eaaf10f.tar.gz
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] (From OE-Core rev: 3b8d43fc53ee13d39abc3b2a1f706a97fcf752aa) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool/create.py')
-rw-r--r--scripts/lib/recipetool/create.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 507a230511..4cf6a5a95c 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -435,7 +435,7 @@ def create_recipe(args):
435 if args.binary: 435 if args.binary:
436 # Assume the archive contains the directory structure verbatim 436 # Assume the archive contains the directory structure verbatim
437 # so we need to extract to a subdirectory 437 # so we need to extract to a subdirectory
438 fetchuri += ';subdir=${BP}' 438 fetchuri += ';subdir=${BPN}'
439 srcuri = fetchuri 439 srcuri = fetchuri
440 rev_re = re.compile(';rev=([^;]+)') 440 rev_re = re.compile(';rev=([^;]+)')
441 res = rev_re.search(srcuri) 441 res = rev_re.search(srcuri)