[yocto] PRINC functionality workaround

Paul Eggleton paul.eggleton at linux.intel.com
Thu Nov 26 03:45:03 PST 2015


On Thursday 26 November 2015 12:16:04 Belisko Marek wrote:
> On Thu, Nov 26, 2015 at 12:03 PM, Paul Eggleton
> <paul.eggleton at linux.intel.com> wrote:
> > On Thursday 26 November 2015 08:16:51 Belisko Marek wrote:
> >> after upgrading to jethro release PRINC functionality was removed by
> >> commit : a4d530bcf55f03258078c10a123e2717444e1060 on oe-core. PRINC
> >> functionality was used in some of our recipes so I took part from
> >> PRINC funtionality and put is to separate method (in bbclass) [0]
> > 
> > You'll have to forgive me for asking the obvious question - why aren't you
> > using the PR server?
> 
> basically we have some base layer which has e.g. PR="rev123" in bb
> recipe. Then we have other layer where we extend functionality
> to base recipe (add custom patches) and we was using PRINC so every
> change in bbappend has increased PR.
> PR is then finally used in our FW update scripts where we update only
> when PR is changed.
> So I would like to introduce kind of PRINC functionality with my change
> back.

Other than that you'd get rev123.1 -> rev123.2 rather than rev124, I'm not 
hearing anything that you can't do with the PR service; what's more you never 
have to remember to bump PR again.

> >> I'm trying to use it in bbappend like:
> >> inherit veryspecial_helpers
> >> PR := ${increase_pr(5)} but this seems to be then evaluated as :
> >> u-boot/2015.07-${increase_pr(5)} which is wrong and fails.
> >> 
> >> Any ideas what is wrong with this approach? Maybe some brackets? Many
> >> thanks.
> > 
> > missing @ ?
> 
> Afters adding @ it complains:
>  Failure expanding variable PR[:=], expression was ${@increase_pr(2)}
> which triggered exception NameError: global name 'd' is not defined

If you're referring to d in the function then you need to pass it in as a 
parameter.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list