summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-03-09 13:57:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-20 11:27:46 +0000
commita5047717bd11d332fc9f4320beaa26719de1793c (patch)
tree0a54a176531a59a7f7453502a7d4912eb27d45a5 /meta
parent3d7777f0613ef45bce39c8448ed6664e9280ff0d (diff)
downloadast2050-yocto-poky-a5047717bd11d332fc9f4320beaa26719de1793c.zip
ast2050-yocto-poky-a5047717bd11d332fc9f4320beaa26719de1793c.tar.gz
classes/externalsrc: fix for recipes that fetch local files
If SRC_URI contains local files (file:// references) these will almost certainly be required at some point during the build process, so we need to actually fetch these to ${WORKDIR} as we would normally. (From OE-Core rev: f223ad3d5b5c90055e50d1b1be69230f55e06336) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 25f0be9..75bdb7a 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -35,7 +35,13 @@ python () {
d.setVar('B', externalsrcbuild)
else:
d.setVar('B', '${WORKDIR}/${BPN}-${PV}/')
- d.setVar('SRC_URI', '')
+
+ srcuri = (d.getVar('SRC_URI', True) or '').split()
+ local_srcuri = []
+ for uri in srcuri:
+ if uri.startswith('file://'):
+ local_srcuri.append(uri)
+ d.setVar('SRC_URI', ' '.join(local_srcuri))
if '{SRCPV}' in d.getVar('PV', False):
# Dummy value because the default function can't be called with blank SRC_URI
@@ -65,7 +71,13 @@ python () {
if setvalue:
d.setVarFlag(task, 'cleandirs', ' '.join(cleandirs))
+ fetch_tasks = ['do_fetch', 'do_unpack']
+ # If we deltask do_patch, there's no dependency to ensure do_unpack gets run, so add one
+ d.appendVarFlag('do_configure', 'deps', ['do_unpack'])
+
for task in d.getVar("SRCTREECOVEREDTASKS", True).split():
+ if local_srcuri and task in fetch_tasks:
+ continue
bb.build.deltask(task, d)
d.prependVarFlag('do_compile', 'prefuncs', "externalsrc_compile_prefunc ")
OpenPOWER on IntegriCloud