summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/externalsrc.bbclass14
1 files changed, 13 insertions, 1 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 25f0be96a5..75bdb7a14d 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -35,7 +35,13 @@ python () {
35 d.setVar('B', externalsrcbuild) 35 d.setVar('B', externalsrcbuild)
36 else: 36 else:
37 d.setVar('B', '${WORKDIR}/${BPN}-${PV}/') 37 d.setVar('B', '${WORKDIR}/${BPN}-${PV}/')
38 d.setVar('SRC_URI', '') 38
39 srcuri = (d.getVar('SRC_URI', True) or '').split()
40 local_srcuri = []
41 for uri in srcuri:
42 if uri.startswith('file://'):
43 local_srcuri.append(uri)
44 d.setVar('SRC_URI', ' '.join(local_srcuri))
39 45
40 if '{SRCPV}' in d.getVar('PV', False): 46 if '{SRCPV}' in d.getVar('PV', False):
41 # Dummy value because the default function can't be called with blank SRC_URI 47 # Dummy value because the default function can't be called with blank SRC_URI
@@ -65,7 +71,13 @@ python () {
65 if setvalue: 71 if setvalue:
66 d.setVarFlag(task, 'cleandirs', ' '.join(cleandirs)) 72 d.setVarFlag(task, 'cleandirs', ' '.join(cleandirs))
67 73
74 fetch_tasks = ['do_fetch', 'do_unpack']
75 # If we deltask do_patch, there's no dependency to ensure do_unpack gets run, so add one
76 d.appendVarFlag('do_configure', 'deps', ['do_unpack'])
77
68 for task in d.getVar("SRCTREECOVEREDTASKS", True).split(): 78 for task in d.getVar("SRCTREECOVEREDTASKS", True).split():
79 if local_srcuri and task in fetch_tasks:
80 continue
69 bb.build.deltask(task, d) 81 bb.build.deltask(task, d)
70 82
71 d.prependVarFlag('do_compile', 'prefuncs', "externalsrc_compile_prefunc ") 83 d.prependVarFlag('do_compile', 'prefuncs', "externalsrc_compile_prefunc ")