aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-10-31 15:50:23 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2016-10-31 16:57:35 +1300
commit299bdc10f6f62885565d15669097dae33cc60081 (patch)
tree873669b9599cfed5299aec00e53d5dae7ef06ff9 /scripts/lib/devtool
parente12d7ba1997bad8c2ee1b93624766363062c06b1 (diff)
downloadopenembedded-core-contrib-299bdc10f6f62885565d15669097dae33cc60081.tar.gz
devtool: finish: warn if moving recipe to unconfigured destination layer
If you run devtool finish to move a recipe created in the workspace by devtool add or devtool upgrade to a layer, and that layer is not currently included in bblayers.conf (perhaps unintentionally), then the recipe will no longer be visible to bitbake. In this scenario, show a warning so that the user isn't surprised by the recipe "going missing". Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r--scripts/lib/devtool/standard.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 9511d5618c..c15bfef9d8 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1517,6 +1517,11 @@ def finish(args, config, basepath, workspace):
destpath = oe.recipeutils.get_bbfile_path(rd, destlayerdir, origrelpath)
if not destpath:
raise DevtoolError("Unable to determine destination layer path - check that %s specifies an actual layer and %s/conf/layer.conf specifies BBFILES. You may also need to specify a more complete path." % (args.destination, destlayerdir))
+ # Warn if the layer isn't in bblayers.conf (the code to create a bbappend will do this in other cases)
+ layerdirs = [os.path.abspath(layerdir) for layerdir in rd.getVar('BBLAYERS', True).split()]
+ if not os.path.abspath(destlayerdir) in layerdirs:
+ bb.warn('Specified destination layer is not currently enabled in bblayers.conf, so the %s recipe will now be unavailable in your current configuration until you add the layer there' % args.recipename)
+
elif destlayerdir == origlayerdir:
# Same layer, update the original recipe
appendlayerdir = None