]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cookerdata.py: remove slash in the end
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 30 Mar 2016 09:32:55 +0000 (02:32 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 Mar 2016 20:29:56 +0000 (21:29 +0100)
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.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cookerdata.py

index c5fdf6637e979fa4791b44b9a900cd0d9adfefb6..50259a9a073367c84a6df26228a201232e55d674 100644 (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')