[OE-core] multiple git repos vs. AUTOREV?

Richard Purdie richard.purdie at linuxfoundation.org
Wed Jun 17 08:10:21 UTC 2015


On Wed, 2015-06-17 at 09:27 +0200, Steffen Sledz wrote:
> On 16.06.2015 16:20, Paul Eggleton wrote:
> > On Tuesday 16 June 2015 16:12:49 Steffen Sledz wrote:
> >> For development purposes we use this method to build always from the HEAD
> >> revision of a git repository.
> >> ...
> >> Now we like to do the same in one recipe which uses sources from two git
> >> repos.
> >> ...
> > 
> > I believe this should work:
> > 
> > -------------> snip <--------------
> > SRCREV_FORMAT = "foo_bar"
> > SRCREV_foo = "${AUTOREV}"
> > SRCREV_bar = "${AUTOREV}"
> > PV = "gitr${SRCPV}"
> >  
> > SRC_URI = " \
> > 	git://git@bitbucket.org/.../foo.git;protocol=ssh,name=foo \
> >  	git://git@bitbucket.org/.../bar.git;protocol=ssh,name=bar \
> >  "
> > -------------> snap <--------------
> 
> Thanx.
> 
> Now we have a similar but little different problem definition. We like to integrate the code of an own kernel driver into the current linux-boundary recipe. Because the driver is under development we like to use the HEAD revision of this repo. My first try was this bbappend.
> 
> -------------> snip <--------------
> SRCREV_FORMAT_append += "_mydriver"
> SRCREV_mydriver = "${AUTOREV}"
> PV_append = "gitr${SRCPV}"
> 
> SRC_URI_append = " \
> 	git://github.com/.../mydriver.git;protocol=https;destsuffix=git.mydriver;name=mydriver \
> "
> 
> ...
> -------------> snap <--------------
> 
> But this leads to an error.
> 
> ERROR: ExpansionError during parsing /.../meta-fsl-arm-extra/recipes-kernel/linux/linux-boundary_3.10.53.bb: Failure expanding variable pkg_postrm_kernel-devicetree: ExpansionError: Failure expanding variable KERNEL_PRIORITY, expression was ${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 +                        int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 +                        int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])} which triggered exception ValueError: invalid literal for int() with base 10: '53gitrAUTOINC'
> 
> Without the PV_append line everything builds well but the resulting package version does not contain a part for the additional repo version. :(
> 
> Any ideas on this one?

What value of PV does the recipe have originally? That code (from
KERNEL_PRIORITY in kernel.bbclass) is meant to be stripping off the base
version and computing values from it:

d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]

however if you don't have a "good" base PV value, its likely its getting
confused. If you use a form like:

PV = "x.y.z"
(in the base recipe)
PV_append = "+gitr${SRCPV}"
(in the append)

then the code above should work ok.

Cheers,

Richard




More information about the Openembedded-core mailing list