[yocto] eo_filter_out not working

Johan Thelin johan.thelin at pelagicore.com
Thu May 23 04:32:32 PDT 2013


Hi Paul,

On 23 May 2013 13:04, Paul Eggleton <paul.eggleton at linux.intel.com> wrote:
> Hi Johan,
>
> On Thursday 23 May 2013 08:59:03 Johan Thelin wrote:
>> I'm trying to build the packagegroup-core-p1 from the meta-ivi layer,
>> but I would like to remove the RRECOMMENDS as I don't want X11. To do
>> this, I've added a packagegroup-core-p1.bbappend to my own layer. In
>> this file I've tried the following options:
>>
>> Attempt #1
>>
>> RRECOMMENDS_packagegroup-core-p1 :=
>> "${@oe_filter_out('packagegroup-xserver-ivi',
>> '${RRECOMMENDS_packagegroup-core-p1}', d)}"
>>
>> ERROR: ExpansionError during parsing
>> /home/e8johan/work/yocto/pelagicore-bsp/sources/meta-ivi/recipes-yocto-ivi/p
>> ackagegroups/packagegroup-core-p1.bb: Failure expanding variable
>> RRECOMMENDS_packagegroup-core-p1[:=],
>> expression was ${@oe_filter_out('packagegroup-xserver-ivi',
>> '${RRECOMMENDS_packagegroup-core-p1}', d)} which triggered exception
>> SyntaxError: EOL while scanning string literal
>> (RRECOMMENDS_packagegroup-core-p1[:=], line 1)
>>
>>
>> I read this as RECOMMENDS_packagegroup-core-p1 is not yet set, so the
>> oe_filter_out part fails.
>>
>>
>>
>> Attempt #2
>>
>> RRECOMMENDS_packagegroup-core-p1 := "foo"
>>
>> WARNING: Variable key RRECOMMENDS_${PN} (    packagegroup-xserver-ivi
>>    ) replaces original key RRECOMMENDS_packagegroup-core-p1 (foo).
>>
>>
>> This sort of explains why attempt #1 fails, as it seems that the bb is
>> evaluated after the bbappend.
>
> It's not specifically about the order of evaluation between the bb and the
> bbappend, what this is saying is assignment statements where the variable name
> on the LHS contains references to other variables will be evaluated after
> assignment statements that don't.
>
> Unfortunately I think this means this kind of expression can't work, because
> at the time of the immediate evaluation, RDEPENDS_packagegroup-core-p1 (which
> is what RDEPENDS_${PN} is later expanded to) isn't available. I tried to get
> the value specifically of RDEPENDS_${PN} in an anonymous python function but
> that doesn't seem to work either.

I was actually able to make it work (thanks to a friendly colleague)
with an anonymous python function:

python () {
    rrec = bb.data.getVar('RRECOMMENDS_packagegroup-core-p1', d, 1)
    if rrec:
        rrec = rrec.replace("packagegroup-xserver-ivi", "")
        bb.data.setVar('RRECOMMENDS_packagegroup-core-p1', rrec, d)
}

I don't know why the original oe_filter_out didn't work, but this does
the trick for me, so I'm good.

Cheers,

Johan

> I think for this case you're probably better off just setting the value as
> desired rather than trying to mangle the original value. When this kind of
> situation arises it usually indicates the recipe being appended needs to be
> changed to be more flexible instead of trying to work around its inflexibility
> in the bbappend.
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre



More information about the yocto mailing list