summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-15 16:23:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-09 08:27:04 +0100
commitbbbd9966e834c9dd9ba6da8af5d600d928c1bb71 (patch)
tree1f8e5c7483f8148f5a545227e484af3439c5dc1d
parente38b37a03fe0017f03212b3e1d073b7bc962af69 (diff)
downloadpoky-bbbd9966e834c9dd9ba6da8af5d600d928c1bb71.tar.gz
devupstream: fix handling of SRC_URI
As the class handler runs before overrides are actually applied we need to check both SRC_URI:class-devupstream and SRC_URI, otherwise the automatic assignment of S="${WORKDIR}/git" for git repositories does not work if the base recipe uses http: but :class-devupstream has a git:// entry instead. Also, there's no need to set S:class-devupstream, we can just assign to S here. (From OE-Core rev: e62e906a2c3d002628c893fdc6a7d2c31499201a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d0edb03088d0d1c20c899daed1bb3a7110b19670) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/devupstream.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/devupstream.bbclass b/meta/classes/devupstream.bbclass
index facc46f3af..ba6dc4136c 100644
--- a/meta/classes/devupstream.bbclass
+++ b/meta/classes/devupstream.bbclass
@@ -30,10 +30,11 @@ python devupstream_virtclass_handler () {
30 # Develpment releases are never preferred by default 30 # Develpment releases are never preferred by default
31 d.setVar("DEFAULT_PREFERENCE", "-1") 31 d.setVar("DEFAULT_PREFERENCE", "-1")
32 32
33 uri = bb.fetch2.URI(d.getVar("SRC_URI").split()[0]) 33 src_uri = d.getVar("SRC_URI:class-devupstream") or d.getVar("SRC_URI")
34 uri = bb.fetch2.URI(src_uri.split()[0])
34 35
35 if uri.scheme == "git" and not d.getVar("S:class-devupstream"): 36 if uri.scheme == "git" and not d.getVar("S:class-devupstream"):
36 d.setVar("S:class-devupstream", "${WORKDIR}/git") 37 d.setVar("S", "${WORKDIR}/git")
37 38
38 # Modify the PV if the recipe hasn't already overridden it 39 # Modify the PV if the recipe hasn't already overridden it
39 pv = d.getVar("PV") 40 pv = d.getVar("PV")