[yocto] Per image customizations

Oleksandr Poznyak oleksandr.poznyak at gmail.com
Wed Jun 8 01:58:28 PDT 2016


Hi, Edward.
Your approach is valid. But RREPLACES is not enough.

You should define that your package and original ones are conflicting and
that it provides the same as original one for other packages.

So in your recipe:

RPROVIDES_${PN} = "sysvinit-inittab"
RREPLACES_${PN} = "sysvinit-inittab"
RCONFLICTS_${PN} = "sysvinit-inittab"

Thanks,
Oleksandr Poznyak!


On Wed, Jun 8, 2016 at 2:23 AM, Paul Eggleton <paul.eggleton at linux.intel.com
> wrote:

> On Tue, 07 Jun 2016 16:07:26 Edward Wingate wrote:
> > On Tue, Jun 7, 2016 at 1:47 PM, Paul Eggleton
> > <paul.eggleton at linux.intel.com> wrote:
> > > So what this will give you is alternative packages to be installed
> instead
> > > of sysvinit-inittab in your image.
> >
> > I was under the (mistaken) impression that my recipe will run in
> > addition to, not instead of, sysvinit-inittab (occurring after it and
> > overwriting its inittab with my custom version).
>
> The recipe will build in addition to sysvinit-inittab yes, but do_install
> for
> that recipe is just assembling the files ready for packaging - it doesn't
> directly install files into the image. When it comes time to assemble the
> image, all that is being done when you distil it down is that we install a
> bunch of packages.
>
> > > Have you verified (by way of the image manifest written next to the
> image
> > > file) that this package is actually being installed?
> >
> > The manifest shows both sysvinit-inittab and my package being
> > installed in the image, but sysvinit-inittab's inittab apparently
> > takes precedence over mine.
>
> Hmm, that is strange, because as they install the same file they ought to
> conflict. Perhaps as suggested elsewhere in this thread this is a bug (or
> at
> least undesirable behaviour) in rpm.
>
> > > What steps have you taken to ensure that it does get installed in
> > > preference to sysvinit-inittab?
> >
> > None, due to my mistaken impression.  After investigating your kind
> > inference with help of Yocto manual, I replaced in my recipe:
> > DEPENDS += " sysvinit-inittab"
> > with:
> > RREPLACES_${PN} = "sysvinit-inittab"
> >
> > and it appears to be working now.  I've been using Yocto for a year
> > now, but still feel like I'm barely scratching the surface of it.  I
> > tend to get things to work by floundering about, so even though it
> > does works, I would appreciate knowing if this was the most proper
> > course of action.  Thanks!
>
> I guess here you are getting into functionality that is not very
> well-defined,
> and you're also dealing with behaviour of the package manager rather than
> the
> build system itself (though I appreciate the lines are blurred from usage
> perspective). I guess it would help though if we would document a working
> procedure to do this kind of thing as it does come up from time to time.
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160608/49f8f112/attachment.html>


More information about the yocto mailing list