diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2013-01-25 16:35:09 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-25 12:42:09 +0000 |
commit | 4a09c91ce4a0b040a71a49d741d10fc850e887fa (patch) | |
tree | e5063beaf80b00ff7d9308252edc2faaecf750fc /bitbake | |
parent | 3183902e1849ee9e5251d55b63024b4b22156649 (diff) | |
download | poky-4a09c91ce4a0b040a71a49d741d10fc850e887fa.tar.gz |
bitbake: bitbake-layers: fix get_file_layer
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]
(Bitbake rev: 7a31b9eac4d894c302f0e052a132c31b17d13d1f)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/bitbake-layers | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers index fa4e767acc..956e7a978c 100755 --- a/bitbake/bin/bitbake-layers +++ b/bitbake/bin/bitbake-layers | |||
@@ -26,6 +26,7 @@ import os | |||
26 | import sys | 26 | import sys |
27 | import fnmatch | 27 | import fnmatch |
28 | from collections import defaultdict | 28 | from collections import defaultdict |
29 | import re | ||
29 | 30 | ||
30 | bindir = os.path.dirname(__file__) | 31 | bindir = os.path.dirname(__file__) |
31 | topdir = os.path.dirname(bindir) | 32 | topdir = os.path.dirname(bindir) |
@@ -458,7 +459,7 @@ build results (as the layer priority order has effectively changed). | |||
458 | for layer, _, regex, _ in self.bbhandler.cooker.status.bbfile_config_priorities: | 459 | for layer, _, regex, _ in self.bbhandler.cooker.status.bbfile_config_priorities: |
459 | if regex.match(filename): | 460 | if regex.match(filename): |
460 | for layerdir in self.bblayers: | 461 | for layerdir in self.bblayers: |
461 | if regex.match(os.path.join(layerdir, 'test')): | 462 | if regex.match(os.path.join(layerdir, 'test')) and re.match(layerdir, filename): |
462 | return self.get_layer_name(layerdir) | 463 | return self.get_layer_name(layerdir) |
463 | return "?" | 464 | return "?" |
464 | 465 | ||