summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2016-06-10 11:32:36 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2016-06-10 10:47:01 +0000
commit8d998d0a93e53af2a08cc8fa54188aa2649728bf (patch)
tree330049a4d805b3d58f4e0d4f15ea90a421f3488b
parent5606ff95051a216f60992f08bf0ca169401891f9 (diff)
downloadmeta-boot2qt-8d998d0a93e53af2a08cc8fa54188aa2649728bf.tar.gz
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 <eirik.aavitsland@qt.io>
-rw-r--r--classes/sdk-sources.bbclass18
1 files changed, 10 insertions, 8 deletions
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 () {
52} 52}
53 53
54python do_unpack () { 54python do_unpack () {
55 sdk_uds = [];
55 src_uri = (d.getVar('SRC_URI', True) or "").split() 56 src_uri = (d.getVar('SRC_URI', True) or "").split()
56 if len(src_uri) == 0: 57 if len(src_uri) == 0:
57 return 58 return
@@ -64,17 +65,18 @@ python do_unpack () {
64 for url in uris: 65 for url in uris:
65 ud = list(bb.fetch2.decodeurl(url)) 66 ud = list(bb.fetch2.decodeurl(url))
66 if ("sdk-uri" in ud[5]): 67 if ("sdk-uri" in ud[5]):
67 unpack_local_uri(ud, d) 68 sdk_uds.append(ud)
68 src_uri.remove(url) 69 src_uri.remove(url)
69 70
70 if len(src_uri) == 0: 71 if len(src_uri) != 0:
71 return 72 try:
73 fetcher = bb.fetch2.Fetch(src_uri, d)
74 fetcher.unpack(rootdir)
75 except bb.fetch2.BBFetchException as e:
76 raise bb.build.FuncFailed(e)
72 77
73 try: 78 for ud in sdk_uds:
74 fetcher = bb.fetch2.Fetch(src_uri, d) 79 unpack_local_uri(ud, d)
75 fetcher.unpack(rootdir)
76 except bb.fetch2.BBFetchException as e:
77 raise bb.build.FuncFailed(e)
78} 80}
79 81
80def unpack_local_uri(ud, d): 82def unpack_local_uri(ud, d):