aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-09-01 11:38:46 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2016-09-06 21:58:58 +1200
commit7c15d9828801d9345c93c0ba40adeb2341471f01 (patch)
treea4eb2cbc4cde015d0db2e69f6dbd8a504c6c50bb /meta
parentd4044adfd000c8b67ed9b523bfbfc49ca97e8fa7 (diff)
downloadopenembedded-core-contrib-7c15d9828801d9345c93c0ba40adeb2341471f01.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.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta')
-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):
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)
+ fname = fetch.ud[uri].basepath
+ if os.path.isabs(fname):
+ continue
+ # Handle subdir=
+ subdir = fetch.ud[uri].parm.get('subdir', '')
+ if subdir:
+ if os.path.isabs(subdir):
+ continue
+ fname = os.path.join(subdir, fname)
+ ret[fname] = fetch.localpath(uri)
return ret