[OE-core] RDEPENDS kernel-image-zimage & kernel.bbclass PKG name

Bruce Ashfield bruce.ashfield at gmail.com
Wed May 15 00:50:08 UTC 2019


On Tue, May 14, 2019 at 12:32 PM André Draszik <git at andred.net> wrote:

> On Tue, 2019-05-14 at 14:35 +0100, André Draszik wrote:
> > Hi,
> >
> > As part of the build, kernel packages are renamed, e.g.
> > kernel-image-zimage basically becomes
> > kernel-image-zimage-${KERNEL_VERSION}
> >
> > When a package created by recipe B RDEPENDS on kernel-image-zimage,
> > the ipk generated ultimately depends on
> > kernel-image-zimage-${KERNEL_VERSION} (not kernel-image-zimage).
> > Once the kernel is updated, it appears as though recipe B is not
> > repackaged, so the package still runtime depends on the original
> > kernel, which doesn't exist anymore, and thus building the image
> > fails.
> >
> > Specifically, I have
> > MACHINE_EXTRA_RDEPENDS += "kernel-image-zimage"
> > in my BSP, and hence packagegroup-machine-base runtime depends on
> > kernel-image-zimage-4.9.11-cl-som-imx7-5.1+gc27010d99a3d.
> > Updating the kernel doesn't trigger a rebuild of
> packagegroup-machine-base,
> > so things fail for me.
> >
> >
> > Am I missing something in my BSP? I could probably do a bbappend
> > on packagegroup-base.bb and add something like
> > do_packagedata[depends] += "virtual/kernel:do_packagedata"
>
> BTW, I've tried the following packagegroup-base.bbappend to no avail:
>
> python do_get_kernel_zimage_name() {
>     new_dep = get_package_mapping('kernel-image-zimage',
> 'packagegroup-machine-base', d)
>     d.appendVarFlag('do_package_write_ipk', 'vardeps', new_dep)
> }
> addtask get_kernel_zimage_name after do_package before do_package_write_ipk
> do_get_kernel_zimage_name[depends] += "virtual/kernel:do_packagedata"
>
>

Hi Andre,

I chased (And fixed) something very similar to this with postinst scripts
and kernel-image that showed a similar symptom (you couldn't add a postinst
to kernel-image-<type> without throwing an error since the PKG_ variables
change the package name to kernel-image-<type>-version).

My fix was specific to the postinst, but I bet this would be a similar fix.

I don't suppose you have a sample set of layers and a build config that I
could kick off here ? That would make it a lot easier to test my theory.

Bruce



>
> I suspect adding the varflag happens too late in this case, as the package
> still isn't rebuilt on kernel updates.
>
> >
> > This doesn't seem right, though.
>
> A.
>
> >
> >
> > Any ideas or thoughts?
> >
> >
> > Cheers,
> > Andre'
> >
> >
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20190514/68b34e83/attachment-0001.html>


More information about the Openembedded-core mailing list