[bitbake-devel] question about BBVERSIONS OVERRIDES and PREFERRED_VERSION

张忠山 zzs213 at 126.com
Sun Aug 21 15:46:57 UTC 2016


I'm using bare bitbake cloned from 'git://git.openembedded.org/bitbake'
Revision id is: 309f5907a3661821e041ed14645b5d165007b058

I has a tese.bb, the content is:

         OVERRIDES = ""
         PN = "test"
         PV = ""

         PREFERRED_VERSION_test = 'xxx'

         OVERRIDES .= "${@':' + ':'.join([x for x in 
'${BBVERSIONS}'.split()])}"
         BBVERSIONS = "develop 1.1.7"
         PREFERRED_VERSION_test = '1.1.7'


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


         python do_build() {
             bb.plain("==%s==" % d.getVar("NAME", True))
         }

Use 'bitbake test -e | less' to explore var setting.
I found:

	# $PV [3 operations]
	#   set /home/zzs/temp/bitbake-hello-world/main/../mylayer/test.bb:4
	#     ""
	#   set ast.py:401 [verfunc]
	#     "1.1.7"
	#   set ast.py:401 [verfunc]
	#     "develop"
	# pre-expansion value:
	#   "develop"
	PV="develop"

I'm already set PREFERRED_VERSION_test = '1.1.7' sure. Why the 'PV' is 
'develop'
And I try set BBVERSIONS = "develop 1.1.7 xx yy". Then 'PV' becomes 'yy'
So my first question is:

How can I select version '1.1.7' for test package through  BBVERSIONS 
and   PREFERRED_VERSION

The second question comes from the override of var 'NAME'.
In the output of 'bitbake test -e' can found:
	#
	# $NAME
	#   override[develop]:set 
/home/zzs/temp/bitbake-hello-world/main/../mylayer/test.bb:14
	#     "version is develop"
	NAME="version is develop"

I'm already set NAME_1.1.7 why bitbake just found override 'develop' but 
'1.1.7'













More information about the bitbake-devel mailing list