summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@theqtcompany.com>2015-06-16 15:43:26 +0300
committerSamuli Piippo <samuli.piippo@theqtcompany.com>2015-06-17 12:20:59 +0300
commite11d78a554a184767383758185a3902e4d6c986d (patch)
tree08a47c7751a04750c03640dfba99c41ddd5485b1 /classes
parent6d7941b077af9c2fd9ecefa67bc1bcab8f50a343 (diff)
downloadmeta-boot2qt-e11d78a554a184767383758185a3902e4d6c986d.tar.gz
Support BYOS for enterprise only addons
When QT_SDK_PATH has been set, use sources for all enterprise addons from the SDK installation path. This allows customers to build enterprise only addos and b2qt addons without access to qt-gerrit. Change-Id: I66ad8a2ff81628333ba7dd6042659c3fa220be8c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/sdk-sources.bbclass (renamed from classes/local-sources.bbclass)15
1 files changed, 12 insertions, 3 deletions
diff --git a/classes/local-sources.bbclass b/classes/sdk-sources.bbclass
index b7c68fb..1c3629b 100644
--- a/classes/local-sources.bbclass
+++ b/classes/sdk-sources.bbclass
@@ -30,9 +30,13 @@ python do_fetch () {
30 uris = list(src_uri); 30 uris = list(src_uri);
31 for url in uris: 31 for url in uris:
32 ud = list(bb.fetch2.decodeurl(url)) 32 ud = list(bb.fetch2.decodeurl(url))
33 if ("local-uri" in ud[5]): 33 if ("sdk-uri" in ud[5]):
34 src_uri.remove(url) 34 src_uri.remove(url)
35 35
36
37 if len(src_uri) == 0:
38 return
39
36 try: 40 try:
37 fetcher = bb.fetch2.Fetch(src_uri, d) 41 fetcher = bb.fetch2.Fetch(src_uri, d)
38 fetcher.download() 42 fetcher.download()
@@ -52,10 +56,13 @@ python do_unpack () {
52 uris = list(src_uri); 56 uris = list(src_uri);
53 for url in uris: 57 for url in uris:
54 ud = list(bb.fetch2.decodeurl(url)) 58 ud = list(bb.fetch2.decodeurl(url))
55 if ("local-uri" in ud[5]): 59 if ("sdk-uri" in ud[5]):
56 unpack_local_uri(ud, d) 60 unpack_local_uri(ud, d)
57 src_uri.remove(url) 61 src_uri.remove(url)
58 62
63 if len(src_uri) == 0:
64 return
65
59 try: 66 try:
60 fetcher = bb.fetch2.Fetch(src_uri, d) 67 fetcher = bb.fetch2.Fetch(src_uri, d)
61 fetcher.unpack(rootdir) 68 fetcher.unpack(rootdir)
@@ -69,9 +76,11 @@ def unpack_local_uri(ud, d):
69 sdk_path = d.getVar('QT_SDK_PATH', True) 76 sdk_path = d.getVar('QT_SDK_PATH', True)
70 77
71 destdir = os.path.join(rootdir, ud[5].get("destsuffix", "git")) 78 destdir = os.path.join(rootdir, ud[5].get("destsuffix", "git"))
72 srcdir = os.path.join(sdk_path, ud[5].get("local-uri")) 79 srcdir = os.path.join(sdk_path, ud[5].get("sdk-uri"))
73 cmd = "cp -vrf %s %s" % (srcdir, destdir) 80 cmd = "cp -vrf %s %s" % (srcdir, destdir)
74 81
82 bb.note("Unpacking SDK sources %s to %s" % (srcdir, destdir))
83
75 if os.path.exists(destdir): 84 if os.path.exists(destdir):
76 bb.utils.prunedir(destdir) 85 bb.utils.prunedir(destdir)
77 86