Skip to contentSkip to conversation

cookerdata.py: remove slash in the end

PATCH New Robert Yang 1 participant 2 messages Mar 30, 2016

lore
Share & tools
lore
#0 lore raw

cover cookerdata.py: remove slash in the end

The following changes since commit ddbeb56f4fb69831453f4b91f5410ba4fde9fa56:

bitbake: cookerdata: Improve handling of ParseError (2016-03-29 23:21:52 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib 96108bac83f88289ad4851f781742f515e882f5d
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=96108bac83f88289ad4851f781742f515e882f5d

Robert Yang (1):
cookerdata.py: remove slash in the end

 bitbake/lib/bb/cookerdata.py | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 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/lib/bb/cookerdata.py | 2 ++
 1 file changed, 2 insertions(+)
bitbake/lib/bb/cookerdata.py +2 -0
index c5fdf66..50259a9 100644
@@ -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')
Signature · 1 line
2.7.4