summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Congal <yoann.congal@smile.fr>2023-12-15 22:21:51 +0100
committerSteve Sakoman <steve@sakoman.com>2023-12-20 04:14:55 -1000
commitf6563cca6c4bf627e904d81fbe5b0b0f2b16a107 (patch)
tree8a46776e287d67ee5f58b4d5f58786597b9756a0
parentd1bc5fb1d090cf93b9014a050b418499c0209080 (diff)
downloadopenembedded-core-f6563cca6c4bf627e904d81fbe5b0b0f2b16a107.tar.gz
externalsrc: Ensure SRCREV is processed before accessing SRC_URI
When SRCREV is used, call bb.fetch.get_srcrev() before accessing SRC_URI. Without this new bb.fetch.get_srcrev() call, SRC_URI might be accessed before SRCREV had a chance to be processed. In master, this is fixed by https://git.yoctoproject.org/poky/commit/?id=62afa02d01794376efab75623f42e7e08af08526 However, this commit is not suited for backport since it is quite invasive. The part of the commit that fix the bug is: --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass @@ -63,6 +63,7 @@ python () { else: d.setVar('B', '${WORKDIR}/${BPN}-${PV}') + bb.fetch.get_hashvalue(d) local_srcuri = [] fetch = bb.fetch2.Fetch((d.getVar('SRC_URI') or '').split(), d) for url in fetch.urls: NB: bb.fetch.get_hashvalue() does not exist in kirkstone but is equivalent to bb.fetch.get_srcrev(). Fixes [YOCTO #14918] Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Suggested-by: Chris Wyse <chris.wyse@wysechoice.net> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/externalsrc.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 97d7379d9f..a209730240 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -62,6 +62,10 @@ python () {
else:
d.setVar('B', '${WORKDIR}/${BPN}-${PV}')
+ if d.getVar('SRCREV', "INVALID") != "INVALID":
+ # Ensure SRCREV has been processed before accessing SRC_URI
+ bb.fetch.get_srcrev(d)
+
local_srcuri = []
fetch = bb.fetch2.Fetch((d.getVar('SRC_URI') or '').split(), d)
for url in fetch.urls: