[bitbake-devel] [PATCH] enable override for suffix just include digit and dot

zzs213 at 126.com zzs213 at 126.com
Fri Aug 26 05:34:59 UTC 2016


From: 张忠山 <zzs213 at 126.com>

Without this patch, if we write these in recipe test.bb:

	NAME_1.1.7   = 'version is 1.1.7'
	NAME_develop = 'version is develop'

Use 'bitbake test -e' to observe 'NAME':
	#
	# $NAME [2 operations]
	#   override[develop]:set .../test.bb:10
	#     "version is develop"
	# pre-expansion value:
	#   "version is develop"
	NAME="version is develop"

Obviously, override for '1.1.7' missing.

Signed-off-by: 张忠山 <zzs213 at 126.com>
---
 lib/bb/data_smart.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 59621b7..ea4ff80 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -559,7 +559,7 @@ class DataSmart(MutableMapping):
         # aka pay the cookie monster
         override = var[var.rfind('_')+1:]
         shortvar = var[:var.rfind('_')]
-        while override and override.islower():
+        while override and (override + 'a').islower():
             if shortvar not in self.overridedata:
                 self.overridedata[shortvar] = []
             if [var, override] not in self.overridedata[shortvar]:
@@ -637,7 +637,7 @@ class DataSmart(MutableMapping):
         if '_' in var:
             override = var[var.rfind('_')+1:]
             shortvar = var[:var.rfind('_')]
-            while override and override.islower():
+            while override and (override + 'a').islower():
                 try:
                     if shortvar in self.overridedata:
                         # Force CoW by recreating the list first
-- 
1.9.1





More information about the bitbake-devel mailing list