diff options
| -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): | |||
| 336 | return remotes | 336 | return remotes |
| 337 | 337 | ||
| 338 | 338 | ||
| 339 | def 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 | |||
| 339 | def get_recipe_patches(d): | 355 | def 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 = [] |
