]> code.ossystems Code Review - openembedded-core.git/commitdiff
extrernalsrc.bbclass: treat kernel meta like local source
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 8 Sep 2015 10:58:12 +0000 (13:58 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Sep 2015 13:25:01 +0000 (14:25 +0100)
Kernel metadata repository needs to be fetched/unpacked into the work
directory in order to build the kernel. Sources pointing to a remote
location are skipped by externalsrc by default which caused kernel build
to fail (because of remote kernel-meta was not made availeble). This
patch will make kernel-meta always available.

[YOCTO #6658]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/externalsrc.bbclass

index 8f7f479293ed09836deae18e04f9bc4c921eed7a..37c6320fca71c88d07db2a67172b3ce8d251f8fc 100644 (file)
@@ -36,11 +36,15 @@ python () {
         else:
             d.setVar('B', '${WORKDIR}/${BPN}-${PV}/')
 
-        srcuri = (d.getVar('SRC_URI', True) or '').split()
         local_srcuri = []
-        for uri in srcuri:
-            if uri.startswith('file://'):
-                local_srcuri.append(uri)
+        fetch = bb.fetch2.Fetch((d.getVar('SRC_URI', True) or '').split(), d)
+        for url in fetch.urls:
+            url_data = fetch.ud[url]
+            parm = url_data.parm
+            if (url_data.type == 'file' or
+                    'type' in parm and parm['type'] == 'kmeta'):
+                local_srcuri.append(url)
+
         d.setVar('SRC_URI', ' '.join(local_srcuri))
 
         if '{SRCPV}' in d.getVar('PV', False):