[OE-core] Weird ALTERNATIVES and staging conflict.

Richard Purdie richard.purdie at linuxfoundation.org
Mon Nov 3 11:35:21 UTC 2014


On Mon, 2014-11-03 at 11:49 +0100, Mike Looijmans wrote:
> On 11/03/2014 11:04 AM, Richard Purdie wrote:
> > On Mon, 2014-11-03 at 10:53 +0100, Mike Looijmans wrote:
> >> On 10/30/2014 06:47 PM, Richard Purdie wrote:
> >>> On Thu, 2014-10-30 at 15:17 +0100, Mike Looijmans wrote:
> >>>> I have this base script that builds FPGA bitstreams:
> >>>>
> >>>> https://github.com/topic-embedded-products/meta-topic/blob/master/recipes-bsp/fpga/fpga-image.inc
> >>>>
> >>>> Now you can have multiple recipes using it, and as such, it seemed a good idea
> >>>> to add these lines to that recipe:
> >>>>
> >>>> +ALTERNATIVE_${PN} = "fpga.bin bitstreams"
> >>>> +ALTERNATIVE_LINK_NAME[fpga.bin] = "${datadir}/fpga.bin"
> >>>> +ALTERNATIVE_TARGET[fpga.bin] = "${datadir}/fpga.bin"
> >>>> +ALTERNATIVE_LINK_NAME[bitstreams] = "${datadir}/bitstreams"
> >>>> +ALTERNATIVE_TARGET[bitstreams] = "${datadir}/bitstreams"
> >>>>
> >>>>
> >>>> This still resulted in staging conflicts.
> >>>
> >>> This isn't surprising since update-alternatives only works for target
> >>> systems. It is not designed for operating on the sysroot.
> >>
> >> I don't want these files in sysroot, I want them on target only.
> >
> > Ok, that makes things much easier.
> >
> >>>> But looking at the contents of the fake packages, the fpga.bin has been
> >>>> renamed by alternatives (as expected), and the symlink will be created after
> >>>> installing, so how come I still get this?
> >>>
> >>> The "staging" code uses the output of do_install directly and does
> >>> different things to the packaging code path. We've never had someone
> >>> with this problem before. Binaries in *bindir only get installed into
> >>> the sysroot in the -native case.
> >>>
> >>> I appreciate that tells you why it doesn't work and not how to fix it
> >>> but hopefully that helps a bit.
> >>
> >> If I understand you correctly, the problem is that the recipe is trying to
> >> install things in sysroot?
> >
> > Correct, by default ${datadir} is staged. The easiest way to handle this
> > may be to define your own sysroot_stage_all function (or
> > sysroot_stage_dirs) which just stages what you need, if anything.
> 
> In other words, make  sysroot_stage_all into a no-op?
> 
> I've been looking at the staging.bbclass, but that's basically the best I can 
> come up with.

I don't know what else your recipe may need. If you don't need to stage
anything into the sysroots, make it a no-op, yes.

Cheers,

Richard




More information about the Openembedded-core mailing list