From: Adrian Freihofer <[email protected]>

Recipes usually name the standard packages based on PN. However, the kernel
uses ${KERNEL_PACKAGE_NAME} as the base name for its packages. This causes
inconsistent -src package naming and prevents complementary package
installation from finding the expected kernel packages. For example, a kernel
can produce kernel-dbg and linux-yocto-src, causing rootfs-dbg to include the
linux-yocto-src package but not kernel-dbg.

Introduce PACKAGE_BASENAME so recipes whose package names are based on
something other than PN can generate consistent -src package names and expose
the base name in pkgdata. Update oe-pkgdata-util to use PACKAGE_BASENAME when
resolving complementary package globs, with a fallback to PN for existing
pkgdata.

This is one possible way to handle the kernel-specific package naming. Other
approaches may be possible too. Some ideas:

- Do we really need this KERNEL_PACKAGE_NAME special feature for kernel
  packages? Or would it be possible to stick to ${PN} as any other recipe
  does?
- Is installing the kernel's complementary packages via standard
  complementary package installation the right mechanism for kernel
  packages? Or should there be a different mechanism which is more in line
  with how the kernel usually gets installed where installing it into the
  rootfs as a package is only one way out of many.

Adrian Freihofer (2):
  package: introduce PACKAGE_BASENAME for consistent kernel -src naming
  oe-pkgdata-util: use PACKAGE_BASENAME for glob PN-substitution
    fallback

 meta/classes-global/package.bbclass | 2 +-
 meta/classes-recipe/kernel.bbclass  | 3 +++
 meta/conf/bitbake.conf              | 6 ++++++
 meta/lib/oe/package.py              | 4 +++-
 scripts/oe-pkgdata-util             | 7 ++++++-
 5 files changed, 19 insertions(+), 3 deletions(-)

-- 
2.55.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#246365): 
https://lists.openembedded.org/g/openembedded-core/message/246365
Mute This Topic: https://lists.openembedded.org/mt/121365625/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to