1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

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>
This commit is contained in:
Markus Lehtonen
2015-04-23 15:38:52 +03:00
committed by Richard Purdie
parent 4bc3f0994e
commit d5e2dd47db
+16
View File
@@ -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 = []