summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2020-06-04 18:33:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-09 13:13:59 +0100
commit43f940172a6e8fd0af1101d7a3b11a918dfa10b0 (patch)
treed543a2ca7799828a78bff9efe4325ae7d1d6a67e /meta/classes
parentc20cb1a00e0d9e65c10bc875c4ba8462e8ab798c (diff)
downloadpoky-43f940172a6e8fd0af1101d7a3b11a918dfa10b0.tar.gz
archiver: Capture git submodules in mirror archiver
Using the new Fetch.expanded_urldata() function we can get URL data for all git submodules. (From OE-Core rev: d908ca51b72f4ba417e7573ae3d953535f53286c) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/archiver.bbclass13
1 files changed, 6 insertions, 7 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 780c562b68..c2c049c343 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -345,13 +345,12 @@ python do_ar_mirror() {
345 345
346 fetcher = bb.fetch2.Fetch(src_uri, d) 346 fetcher = bb.fetch2.Fetch(src_uri, d)
347 347
348 for url in fetcher.urls: 348 for ud in fetcher.expanded_urldata():
349 if is_excluded(url): 349 if is_excluded(ud.url):
350 bb.note('Skipping excluded url: %s' % (url)) 350 bb.note('Skipping excluded url: %s' % (ud.url))
351 continue 351 continue
352 352
353 bb.note('Archiving url: %s' % (url)) 353 bb.note('Archiving url: %s' % (ud.url))
354 ud = fetcher.ud[url]
355 ud.setup_localpath(d) 354 ud.setup_localpath(d)
356 localpath = None 355 localpath = None
357 356
@@ -367,7 +366,7 @@ python do_ar_mirror() {
367 if len(ud.mirrortarballs) and not localpath: 366 if len(ud.mirrortarballs) and not localpath:
368 bb.warn('Mirror tarballs are listed for a source but none are present. ' \ 367 bb.warn('Mirror tarballs are listed for a source but none are present. ' \
369 'Falling back to original download.\n' \ 368 'Falling back to original download.\n' \
370 'SRC_URI = %s' % (url)) 369 'SRC_URI = %s' % (ud.url))
371 370
372 # Check original download 371 # Check original download
373 if not localpath: 372 if not localpath:
@@ -376,7 +375,7 @@ python do_ar_mirror() {
376 375
377 if not localpath or not os.path.exists(localpath): 376 if not localpath or not os.path.exists(localpath):
378 bb.fatal('Original download is missing for a source.\n' \ 377 bb.fatal('Original download is missing for a source.\n' \
379 'SRC_URI = %s' % (url)) 378 'SRC_URI = %s' % (ud.url))
380 379
381 # We now have an appropriate localpath 380 # We now have an appropriate localpath
382 bb.note('Copying source mirror') 381 bb.note('Copying source mirror')