diff options
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 | ||