From 8d998d0a93e53af2a08cc8fa54188aa2649728bf Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 10 Jun 2016 11:32:36 +0300 Subject: sdk-source: unpack all other sources first Make sure that all the normal src-uris are unpacked before handling the sdk-uris, otherwise the copied files might get removed. Change-Id: Ib9cb3552653c4b9f58bc56e3be599786e9873b40 Task-number: QTBUG-54002 Reviewed-by: Eirik Aavitsland --- classes/sdk-sources.bbclass | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'classes/sdk-sources.bbclass') diff --git a/classes/sdk-sources.bbclass b/classes/sdk-sources.bbclass index 435bb1a..b12f371 100644 --- a/classes/sdk-sources.bbclass +++ b/classes/sdk-sources.bbclass @@ -52,6 +52,7 @@ python do_fetch () { } python do_unpack () { + sdk_uds = []; src_uri = (d.getVar('SRC_URI', True) or "").split() if len(src_uri) == 0: return @@ -64,17 +65,18 @@ python do_unpack () { for url in uris: ud = list(bb.fetch2.decodeurl(url)) if ("sdk-uri" in ud[5]): - unpack_local_uri(ud, d) + sdk_uds.append(ud) src_uri.remove(url) - if len(src_uri) == 0: - return + if len(src_uri) != 0: + try: + fetcher = bb.fetch2.Fetch(src_uri, d) + fetcher.unpack(rootdir) + except bb.fetch2.BBFetchException as e: + raise bb.build.FuncFailed(e) - try: - fetcher = bb.fetch2.Fetch(src_uri, d) - fetcher.unpack(rootdir) - except bb.fetch2.BBFetchException as e: - raise bb.build.FuncFailed(e) + for ud in sdk_uds: + unpack_local_uri(ud, d) } def unpack_local_uri(ud, d): -- cgit v1.2.3-54-g00ecf