summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/recipeutils.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-09-01 11:38:46 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-08 00:36:48 +0100
commit39d3aa28283d763bbc4aadcbb040f038a506a6df (patch)
tree2592b3286248025984b9134ea5c2111ab14048f2 /meta/lib/oe/recipeutils.py
parent94aefd9a39c688f34cfb0c9ef003de74d754f0e4 (diff)
downloadpoky-39d3aa28283d763bbc4aadcbb040f038a506a6df.tar.gz
devtool: update-recipe: support files with subdir=
It's rare but there are recipes that have individual files (as opposed to archives) in SRC_URI using subdir= to put them under the source tree, the examples in OE-Core being bzip2 and openssl. This broke devtool update-recipe (and devtool finish) because the file wasn't unpacked into the oe-local-files directory and thus when it came time to update the recipe, the file was assumed to have been deleted by the user and thus the file was erroneously removed. Add logic to handle these properly so that this doesn't happen. (We still have another potential problem in that these files become part of the initial commit from upstream, which could be confusing because they didn't come from there - but that's a separate issue and not one that is trivially solved.) (From OE-Core rev: 9069fef5dad5a873c8a8f720f7bcbc7625556309) Signed-off-by: Paul Eggleton <paul.eggleton@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.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index e7dd8afb08..a0d78dde46 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -400,8 +400,16 @@ def get_recipe_local_files(d, patches=False):
400 bb.utils.exec_flat_python_func('patch_path', uri, fetch, '')): 400 bb.utils.exec_flat_python_func('patch_path', uri, fetch, '')):
401 continue 401 continue
402 # Skip files that are referenced by absolute path 402 # Skip files that are referenced by absolute path
403 if not os.path.isabs(fetch.ud[uri].basepath): 403 fname = fetch.ud[uri].basepath
404 ret[fetch.ud[uri].basepath] = fetch.localpath(uri) 404 if os.path.isabs(fname):
405 continue
406 # Handle subdir=
407 subdir = fetch.ud[uri].parm.get('subdir', '')
408 if subdir:
409 if os.path.isabs(subdir):
410 continue
411 fname = os.path.join(subdir, fname)
412 ret[fname] = fetch.localpath(uri)
405 return ret 413 return ret
406 414
407 415