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

张忠山 zzs213 at 126.com
Mon Aug 29 02:50:10 UTC 2016


在 2016年08月28日 03:55, Christopher Larson 写道:
>
> On Sat, Aug 27, 2016 at 12:32 AM, 张忠山 <zzs213 at 126.com
> <mailto:zzs213 at 126.com>> wrote:
>
>             Without this patch, if we write these in recipe test.bb
>             <http://test.bb> <http://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
>             <http://test.bb:10> <http://test.bb:10>
>                     #     "version is develop"
>                     # pre-expansion value:
>                     #   "version is develop"
>                     NAME="version is develop"
>
>             Obviously, override for '1.1.7' missing.
>
>
>         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
>
>
>     Since we can use the path delimeter '/' in override like
>     'virtual/kernel'. Why we can't use dot in override.
>
>     And bitbkae would add 'PV'(which default to '1.0' in OE) to
>     'OVERRIDES'. So using dot in override may not be an issue.
>
>     In bitbake manual, It said we can use BBVERSIONS and override to let
>     sigle recipe support multiple package version
>
>     If we can't use dot in override, Howto use BBVERSIONS? Use embedded
>     python code to set var according version? But it is ugly tahn using
>     override!
>
>
> OVERRIDES .= ":pv-${@'${PV}'.replace('.', '_')}"
> FOO_pv-1_1_7 = "bar"
>

Thanks for your suggestion.
But I found just the folowwing enough:

	OVERRIDES .= ":pv-${PV}"
	FOO_pv-1.1.7 = 'bar'

So I wonder why we must avoid dot in override. Is it mandatory or a 
convention.

And is there some taboos with 'override'. If any it should appear in 
manual I think.

> It's worth noting that you're likely the first person to try using it
> since I added the feature. oe-core moved to a policy where only one
> version of a given recipe is kept in most cases, making it less useful.

Does this means 'BBVERSIONS' would disappeared in th future?






More information about the bitbake-devel mailing list