Comments
Patch
@@ -26,6 +26,7 @@ import os
import sys
import fnmatch
from collections import defaultdict
+import re
bindir = os.path.dirname(__file__)
topdir = os.path.dirname(bindir)
@@ -458,7 +459,7 @@ build results (as the layer priority order has effectively changed).
for layer, _, regex, _ in self.bbhandler.cooker.status.bbfile_config_priorities:
if regex.match(filename):
for layerdir in self.bblayers:
- if regex.match(os.path.join(layerdir, 'test')):
+ if regex.match(os.path.join(layerdir, 'test')) and re.match(layerdir, filename):
return self.get_layer_name(layerdir)
return "?"
The get_file_layer can't handle the nested layer correctly, e.g.: meta-intel/conf/layer.conf meta-intel/meta-cedartrail/conf/layer.conf They are two layers, the file: meta-intel/common/recipes-bsp/amt/lms_7.1.20.bb belongs to meta-intel's layer, but the get_file_layer() may return meta-cedartrail accordig to BBLAYERS' order, since it uses: for layerdir in self.bblayers: if regex.match(os.path.join(layerdir, 'test')): return self.get_layer_name(layerdir) which doesn't care the filename, re-match the filename would fix the problem. [YOCTO #3387] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- bitbake/bin/bitbake-layers | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)