summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-08-31 11:54:06 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-31 23:30:02 +0100
commit34580ac2872da6ae70d5269eb107d31cd5239ad7 (patch)
treef1165861a24b41a67d413b5357f0f554753c0a4f /meta/lib/oe
parent24cfac526305e623f368152147497b39cb26044c (diff)
downloadpoky-34580ac2872da6ae70d5269eb107d31cd5239ad7.tar.gz
devtool: upgrade: fix handling of non-absolute paths
If your BBLAYERS has non-absolute paths in it (e.g. "${COREBASE}/../something") then none of the paths matched in copy_recipe_files() with the result that no files got copied and you ended up with an error later on because the recipe file couldn't be found at the destination. Fix this as well as adding an explicit check to see if no files got copied - error out earlier if so. Fixes [YOCTO #10981]. (From OE-Core rev: 3861486ad06f90c8644ebab119bbc5ddb9e693ca) 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')
-rw-r--r--meta/lib/oe/recipeutils.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index a7fdd36e40..b946128d78 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -334,11 +334,13 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True):
334 fetch.download() 334 fetch.download()
335 335
336 # Copy local files to target directory and gather any remote files 336 # Copy local files to target directory and gather any remote files
337 bb_dir = os.path.dirname(d.getVar('FILE')) + os.sep 337 bb_dir = os.path.abspath(os.path.dirname(d.getVar('FILE'))) + os.sep
338 remotes = [] 338 remotes = []
339 copied = [] 339 copied = []
340 includes = [path for path in d.getVar('BBINCLUDED').split() if 340 # Need to do this in two steps since we want to check against the absolute path
341 path.startswith(bb_dir) and os.path.exists(path)] 341 includes = [os.path.abspath(path) for path in d.getVar('BBINCLUDED').split() if os.path.exists(path)]
342 # We also check this below, but we don't want any items in this list being considered remotes
343 includes = [path for path in includes if path.startswith(bb_dir)]
342 for path in fetch.localpaths() + includes: 344 for path in fetch.localpaths() + includes:
343 # Only import files that are under the meta directory 345 # Only import files that are under the meta directory
344 if path.startswith(bb_dir): 346 if path.startswith(bb_dir):