diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2015-04-23 15:38:52 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-29 15:15:46 +0100 |
commit | c94cf6e6e8a0645c822a708a432901dcb5ce5bf4 (patch) | |
tree | 6fba62d9a2611898eb19cfde6fe919a56de97632 /meta | |
parent | 4a1dec5c61f73e7cfa430271ed395094bb262f6b (diff) | |
download | openembedded-core-c94cf6e6e8a0645c822a708a432901dcb5ce5bf4.tar.gz openembedded-core-c94cf6e6e8a0645c822a708a432901dcb5ce5bf4.tar.bz2 openembedded-core-c94cf6e6e8a0645c822a708a432901dcb5ce5bf4.zip |
recipeutils: implement get_recipe_local_files()
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 16 |
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): return remotes +def get_recipe_local_files(d, patches=False): + """Get a list of local files in SRC_URI within a recipe.""" + uris = (d.getVar('SRC_URI', True) or "").split() + fetch = bb.fetch2.Fetch(uris, d) + ret = {} + for uri in uris: + if fetch.ud[uri].type == 'file': + if (not patches and + bb.utils.exec_flat_python_func('patch_path', uri, fetch, '')): + continue + # Skip files that are referenced by absolute path + if not os.path.isabs(fetch.ud[uri].basepath): + ret[fetch.ud[uri].basepath] = fetch.localpath(uri) + return ret + + def get_recipe_patches(d): """Get a list of the patches included in SRC_URI within a recipe.""" patchfiles = [] |