summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2020-05-20 21:05:56 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-05 21:36:30 +0100
commit7c65513587293d9f22746e534184629b3b30db52 (patch)
tree8c1476c6cfaca4da449e8f6cc5c44e4edfc7ce53 /meta
parent6dc4f62bcc8688a55cf17e3f4f876da2859ef1f1 (diff)
downloadpoky-7c65513587293d9f22746e534184629b3b30db52.tar.gz
archiver.bbclass: Fix duplicated SRC_URIs for do_ar_original
The argument urls of bb.fetch2.Fetch(urls, d) are duplicated to SRC_URI, which caused errors like: 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/docker/notary.git;destsuffix=git/src/github.com/docker/notary git://github.com/docker/notary.git The first one is from original SRC_URI, the second one is from the variable 'urls', so cleanup SRC_URI before call bb.fetch2.Fetch() can fix the problem. (From OE-Core rev: a7f50876f95a9be9fe045af1e4efddfe53a983f5) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b244c4f3427cd07376d4b8f7d27e38735bcc90e7) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/archiver.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 43333a7551..780c562b68 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -193,7 +193,13 @@ python do_ar_original() {
193 del decoded[5][param] 193 del decoded[5][param]
194 encoded = bb.fetch2.encodeurl(decoded) 194 encoded = bb.fetch2.encodeurl(decoded)
195 urls[i] = encoded 195 urls[i] = encoded
196 fetch = bb.fetch2.Fetch(urls, d) 196
197 # Cleanup SRC_URI before call bb.fetch2.Fetch() since now SRC_URI is in the
198 # variable "urls", otherwise there might be errors like:
199 # The SRCREV_FORMAT variable must be set when multiple SCMs are used
200 ld = bb.data.createCopy(d)
201 ld.setVar('SRC_URI', '')
202 fetch = bb.fetch2.Fetch(urls, ld)
197 tarball_suffix = {} 203 tarball_suffix = {}
198 for url in fetch.urls: 204 for url in fetch.urls:
199 local = fetch.localpath(url).rstrip("/"); 205 local = fetch.localpath(url).rstrip("/");