summaryrefslogtreecommitdiffstats
path: root/scripts/lib
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 /scripts/lib
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 'scripts/lib')
-rw-r--r--scripts/lib/devtool/upgrade.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index 1f11d47e5a..24937dcd20 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -301,6 +301,9 @@ def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, workspace, tinfoil
301 path = os.path.join(workspace, 'recipes', bpn) 301 path = os.path.join(workspace, 'recipes', bpn)
302 bb.utils.mkdirhier(path) 302 bb.utils.mkdirhier(path)
303 copied, _ = oe.recipeutils.copy_recipe_files(rd, path) 303 copied, _ = oe.recipeutils.copy_recipe_files(rd, path)
304 if not copied:
305 raise DevtoolError('Internal error - no files were copied for recipe %s' % bpn)
306 logger.debug('Copied %s to %s' % (copied, path))
304 307
305 oldpv = rd.getVar('PV') 308 oldpv = rd.getVar('PV')
306 if not newpv: 309 if not newpv: