[poky] [PATCH 2/2] yocto-kernel: enforce exact match for BBLAYERS

Tom Zanussi tom.zanussi at linux.intel.com
Wed Jul 3 13:13:34 PDT 2013


The current code uses .startswith to find BBLAYERS, which causes false
positives when other variables such as BBLAYERS_NON_REMOVABLE exist.

This forces an exact match instead of a partial match.

Fixes [YOCTO #4743].

Signed-off-by: Tom Zanussi <tom.zanussi at linux.intel.com>
---
 scripts/lib/bsp/kernel.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/bsp/kernel.py b/scripts/lib/bsp/kernel.py
index 94ae950..c3592a3 100644
--- a/scripts/lib/bsp/kernel.py
+++ b/scripts/lib/bsp/kernel.py
@@ -54,7 +54,8 @@ def find_bblayers(scripts_path):
     in_bblayers = False
     for line in lines:
         line = line.strip()
-        if line.strip().startswith("BBLAYERS"):
+        tokens = line.split()
+        if len(tokens) > 0 and tokens[0] == 'BBLAYERS':
             bblayers_lines.append(line)
             in_bblayers = True
             quotes = line.strip().count('"')
-- 
1.7.11.4




More information about the poky mailing list