summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-10-02 15:45:49 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-11 12:14:27 +0000
commitff1efda2af1027421cb27a398484b4b4e4798646 (patch)
treeff6f347d802ed484c7b6ae9cc5a6a9fb9d18267e /scripts
parentfe85a2a8b4adb9671ad308e75fc3d1f2c5e08916 (diff)
downloadpoky-ff1efda2af1027421cb27a398484b4b4e4798646.tar.gz
devtool: finish: fix "layer not in bblayers.conf" warning when path specified
devtool finish will check if the destination layer is part of bblayers.conf so that we avoid the user getting confused about the recipe vanishing from their configuration if it isn't. devtool finish also accepts a path underneath a layer so that you have a bit more control over where it ends up. However if you used a path underneath a layer then it wasn't converting this to the base of the layer before checking it against BBLAYERS, thus the warning was being shown erroneously in that case. (From OE-Core rev: ab1b8d55e551fea3e8656aab7a786d1bfec62d0f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 7fee304572..166862f12f 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1714,6 +1714,8 @@ def finish(args, config, basepath, workspace):
1714 elif line.startswith('# original_files:'): 1714 elif line.startswith('# original_files:'):
1715 origfilelist = line.split(':')[1].split() 1715 origfilelist = line.split(':')[1].split()
1716 1716
1717 destlayerbasedir = oe.recipeutils.find_layerdir(destlayerdir)
1718
1717 if origlayerdir == config.workspace_path: 1719 if origlayerdir == config.workspace_path:
1718 # Recipe file itself is in workspace, update it there first 1720 # Recipe file itself is in workspace, update it there first
1719 appendlayerdir = None 1721 appendlayerdir = None
@@ -1727,7 +1729,7 @@ def finish(args, config, basepath, workspace):
1727 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)) 1729 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))
1728 # Warn if the layer isn't in bblayers.conf (the code to create a bbappend will do this in other cases) 1730 # Warn if the layer isn't in bblayers.conf (the code to create a bbappend will do this in other cases)
1729 layerdirs = [os.path.abspath(layerdir) for layerdir in rd.getVar('BBLAYERS').split()] 1731 layerdirs = [os.path.abspath(layerdir) for layerdir in rd.getVar('BBLAYERS').split()]
1730 if not os.path.abspath(destlayerdir) in layerdirs: 1732 if not os.path.abspath(destlayerbasedir) in layerdirs:
1731 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) 1733 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)
1732 1734
1733 elif destlayerdir == origlayerdir: 1735 elif destlayerdir == origlayerdir:
@@ -1740,7 +1742,7 @@ def finish(args, config, basepath, workspace):
1740 destpath = None 1742 destpath = None
1741 1743
1742 # Remove any old files in the case of an upgrade 1744 # Remove any old files in the case of an upgrade
1743 if origpath and origfilelist and oe.recipeutils.find_layerdir(origpath) == oe.recipeutils.find_layerdir(destlayerdir): 1745 if origpath and origfilelist and oe.recipeutils.find_layerdir(origpath) == destlayerbasedir:
1744 for fn in origfilelist: 1746 for fn in origfilelist:
1745 fnp = os.path.join(origpath, fn) 1747 fnp = os.path.join(origpath, fn)
1746 try: 1748 try: