summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/recipeutils.py
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2015-04-23 15:38:52 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-01 07:43:31 +0100
commitd5e2dd47db886e728ca2a1cc9d771921c1f509d3 (patch)
tree68f28768709093bf32dd945b0e0a90d91b903ec8 /meta/lib/oe/recipeutils.py
parent4bc3f0994e68b3302a0523a3156dd0dca0cac7a0 (diff)
downloadpoky-d5e2dd47db886e728ca2a1cc9d771921c1f509d3.tar.gz
recipeutils: implement get_recipe_local_files()
(From OE-Core rev: c94cf6e6e8a0645c822a708a432901dcb5ce5bf4) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-rw-r--r--meta/lib/oe/recipeutils.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 5fd5dcba98..207c300667 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -336,6 +336,22 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True):
336 return remotes 336 return remotes
337 337
338 338
339def get_recipe_local_files(d, patches=False):
340 """Get a list of local files in SRC_URI within a recipe."""
341 uris = (d.getVar('SRC_URI', True) or "").split()
342 fetch = bb.fetch2.Fetch(uris, d)
343 ret = {}
344 for uri in uris:
345 if fetch.ud[uri].type == 'file':
346 if (not patches and
347 bb.utils.exec_flat_python_func('patch_path', uri, fetch, '')):
348 continue
349 # Skip files that are referenced by absolute path
350 if not os.path.isabs(fetch.ud[uri].basepath):
351 ret[fetch.ud[uri].basepath] = fetch.localpath(uri)
352 return ret
353
354
339def get_recipe_patches(d): 355def get_recipe_patches(d):
340 """Get a list of the patches included in SRC_URI within a recipe.""" 356 """Get a list of the patches included in SRC_URI within a recipe."""
341 patchfiles = [] 357 patchfiles = []