bitbake: cookerdata.py: remove slash in the end

It's very possible that we added layer as:
BBLAYERS += "/path/to/meta/"

then there would be warning:
WARNING: No bb files matched BBFILE_PATTERN_core '^/path/to/meta//'

This patch can fix the problem.

(Bitbake rev: 2b1cb21d18fb18399e682021b866babeced9a4aa)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Robert Yang 2016-03-30 02:32:55 -07:00 committed by Richard Purdie
parent e26087f091
commit f719386841
1 changed files with 2 additions and 0 deletions

View File

@ -292,6 +292,8 @@ class CookerDataBuilder(object):
parselog.debug(2, "Adding layer %s", layer)
if 'HOME' in approved and '~' in layer:
layer = os.path.expanduser(layer)
if layer.endswith('/'):
layer = layer.rstrip('/')
data.setVar('LAYERDIR', layer)
data = parse_config_file(os.path.join(layer, "conf", "layer.conf"), data)
data.expandVarref('LAYERDIR')