<p dir="ltr"></p>
<p dir="ltr">On Aug 25, 2016 10:35 PM, <<a href="mailto:zzs213@126.com">zzs213@126.com</a>> wrote:<br>
><br>
> From: 张忠山 <<a href="mailto:zzs213@126.com">zzs213@126.com</a>><br>
><br>
> Without this patch, if we write these in recipe <a href="http://test.bb">test.bb</a>:<br>
><br>
> NAME_1.1.7 = 'version is 1.1.7'<br>
> NAME_develop = 'version is develop'<br>
><br>
> Use 'bitbake test -e' to observe 'NAME':<br>
> #<br>
> # $NAME [2 operations]<br>
> # override[develop]:set .../<a href="http://test.bb:10">test.bb:10</a><br>
> # "version is develop"<br>
> # pre-expansion value:<br>
> # "version is develop"<br>
> NAME="version is develop"<br>
><br>
> Obviously, override for '1.1.7' missing.</p>
<p dir="ltr">Dot is not allowed in variable names intentionally since its file extension separator. I am not sure if its a good idea to allow it in variable names<br>
><br>
> Signed-off-by: 张忠山 <<a href="mailto:zzs213@126.com">zzs213@126.com</a>><br>
> ---<br>
> lib/bb/data_smart.py | 4 ++--<br>
> 1 file changed, 2 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py<br>
> index 59621b7..ea4ff80 100644<br>
> --- a/lib/bb/data_smart.py<br>
> +++ b/lib/bb/data_smart.py<br>
> @@ -559,7 +559,7 @@ class DataSmart(MutableMapping):<br>
> # aka pay the cookie monster<br>
> override = var[var.rfind('_')+1:]<br>
> shortvar = var[:var.rfind('_')]<br>
> - while override and override.islower():<br>
> + while override and (override + 'a').islower():<br>
> if shortvar not in self.overridedata:<br>
> self.overridedata[shortvar] = []<br>
> if [var, override] not in self.overridedata[shortvar]:<br>
> @@ -637,7 +637,7 @@ class DataSmart(MutableMapping):<br>
> if '_' in var:<br>
> override = var[var.rfind('_')+1:]<br>
> shortvar = var[:var.rfind('_')]<br>
> - while override and override.islower():<br>
> + while override and (override + 'a').islower():<br>
> try:<br>
> if shortvar in self.overridedata:<br>
> # Force CoW by recreating the list first<br>
> --<br>
> 1.9.1<br>
><br>
><br>
> --<br>
> _______________________________________________<br>
> bitbake-devel mailing list<br>
> <a href="mailto:bitbake-devel@lists.openembedded.org">bitbake-devel@lists.openembedded.org</a><br>
> <a href="http://lists.openembedded.org/mailman/listinfo/bitbake-devel">http://lists.openembedded.org/mailman/listinfo/bitbake-devel</a><br></p>