[bitbake-devel] question about BBVERSIONS OVERRIDES and PREFERRED_VERSION
张忠山
zzs213 at 126.com
Mon Aug 22 09:56:59 UTC 2016
> Use 'bitbake test -e' to examine the overrides of var 'NAME', It is
> still not contain override for '1.1.7':
>
> #
> # $NAME [2 operations]
> # override[develop]:set
> /home/zzs/temp/bitbake-hello-world/main/../mylayer/test.bb:10
> # "version is develop"
> # override[pp]:set
> /home/zzs/temp/bitbake-hello-world/main/../mylayer/test.bb:11
> # "version is pp"
> # pre-expansion value:
> # "version is pp"
> NAME="version is pp"
>
> Why ? I expect it should contain override for '1.1.7', like this:
> override[1.1.7]:set
> /home/zzs/temp/bitbake-hello-world/main/../mylayer/test.bb:11
> ....
> And I found all NAME_xxx, where xxx is [a-z] all OK? I has no idea about
> this.
> Anybody help me?
>
I found using the flowwing patch can solve my problem about override for
'1.1.7':
============================================================
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 2ab884b..216ba93 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -552,7 +552,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]:
============================================================
But, I'm not sure this work for other env.
I don't know why just lower case override permited in this function.
Version string just include digit and point is very common, but
islower() return False for these strings.
This behavior is intended or a bug?
Or has another way to solve my problem?
More information about the bitbake-devel
mailing list