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

André Draszik git at andred.net
Wed May 15 07:42:38 UTC 2019


Hi Bruce,

On Tue, 2019-05-14 at 20:50 -0400, Bruce Ashfield wrote:
> 
> 
> 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.

Thanks for the offer Bruce, I'll try. Shouldn't be too hard I hope.

A.




More information about the Openembedded-core mailing list