* [PATCH 1/4] util-linux: Improve PACKAGES_DYNAMIC handling for util-linux-native
@ 2025-01-06 16:09 Richard Purdie
2025-01-06 16:09 ` [PATCH 2/4] coreutils: Improve core-utils-native dependency handling Richard Purdie
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Richard Purdie @ 2025-01-06 16:09 UTC (permalink / raw)
To: openembedded-core
DEBUG: Assuming util-linux-swapon-native is a dynamic package, but it may not exist
DEBUG: Assuming util-linux-swapon-native is a dynamic package, but it may not exist
DEBUG: providers for util-linux-swapon-native are: ['util-linux', 'util-linux-native']
DEBUG: sorted runtime providers for util-linux-swapon-native are: ['recipes-core/util-linux/util-linux_2.40.2.bb', 'virtual:native:recipes-core/util-linux/util-linux_2.40.2.bb']
NOTE: Multiple providers are available for runtime util-linux-swapon-native (util-linux, util-linux-native)
The PACKAGES_DYANMIC line could match native and non-native packages so
tweak to improve -native handling and avoid the above warnings in world builds.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/recipes-core/util-linux/util-linux_2.40.2.bb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/util-linux/util-linux_2.40.2.bb b/meta/recipes-core/util-linux/util-linux_2.40.2.bb
index 2c7dd154e19..5be35eabf82 100644
--- a/meta/recipes-core/util-linux/util-linux_2.40.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.40.2.bb
@@ -59,7 +59,8 @@ python util_linux_libpackages() {
PACKAGESPLITFUNCS =+ "util_linux_libpackages"
-PACKAGES_DYNAMIC = "^${PN}-.*"
+PACKAGES_DYNAMIC = "^${MLPREFIX}${BPN}-.*"
+PACKAGES_DYNAMIC:class-native = "^${PN}-.*-native"
UTIL_LINUX_LIBDIR = "${libdir}"
UTIL_LINUX_LIBDIR:class-target = "${base_libdir}"
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/4] coreutils: Improve core-utils-native dependency handling 2025-01-06 16:09 [PATCH 1/4] util-linux: Improve PACKAGES_DYNAMIC handling for util-linux-native Richard Purdie @ 2025-01-06 16:09 ` Richard Purdie 2025-01-06 16:09 ` [PATCH 3/4] bitbake.conf: Add bash-completion-native to ASSUME_PROVIDED Richard Purdie 2025-01-06 16:09 ` [PATCH 4/4] native: Improve ${PN}-XXX package name handling Richard Purdie 2 siblings, 0 replies; 6+ messages in thread From: Richard Purdie @ 2025-01-06 16:09 UTC (permalink / raw) To: openembedded-core bash-dev-native does not exist, nor should it. Tweak the recipe so that if/as/when we fix native ${PN}-XXX handling, this doesn't break. Use variable indirection as the least worse solution as an override directly will get overwritten with variable renaming, resulting in a warning. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- meta/recipes-core/coreutils/coreutils_9.5.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/coreutils/coreutils_9.5.bb b/meta/recipes-core/coreutils/coreutils_9.5.bb index af0fcdcc4cf..ae07cba164a 100644 --- a/meta/recipes-core/coreutils/coreutils_9.5.bb +++ b/meta/recipes-core/coreutils/coreutils_9.5.bb @@ -182,7 +182,9 @@ RDEPENDS:${PN}-ptest += "bash findutils gawk make perl perl-modules python3-core # may need tweaking if DEPENDS changes # Can't use ${PN}-dev here since flags with overrides and key expansion not supported RRECOMMENDS:coreutils-dev[nodeprrecs] = "1" -RRECOMMENDS:${PN}-dev += "acl-dev attr-dev gmp-dev libcap-dev bash-dev findutils-dev gawk-dev shadow-dev" +DEVDEPS = "acl-dev attr-dev gmp-dev libcap-dev bash-dev findutils-dev gawk-dev shadow-dev" +DEVDEPS:class-native = "" +RRECOMMENDS:${PN}-dev += "${DEVDEPS}" do_install_ptest () { install -d ${D}${PTEST_PATH}/tests ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] bitbake.conf: Add bash-completion-native to ASSUME_PROVIDED 2025-01-06 16:09 [PATCH 1/4] util-linux: Improve PACKAGES_DYNAMIC handling for util-linux-native Richard Purdie 2025-01-06 16:09 ` [PATCH 2/4] coreutils: Improve core-utils-native dependency handling Richard Purdie @ 2025-01-06 16:09 ` Richard Purdie 2025-01-06 16:09 ` [PATCH 4/4] native: Improve ${PN}-XXX package name handling Richard Purdie 2 siblings, 0 replies; 6+ messages in thread From: Richard Purdie @ 2025-01-06 16:09 UTC (permalink / raw) To: openembedded-core With some native dependency handling fixes under discussion, bash-completiion-native makes it into the dependency chain. Add this to ASSUME_PROVIDED since we don't want to build it rather than trying to remove all references in the native case (it comes from glib-2.0-native). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- meta/conf/bitbake.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 16e4f4429f8..8449b6bdcbe 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -205,6 +205,7 @@ DATETIME = "${DATE}${TIME}" # its own in staging ASSUME_PROVIDED = "\ bash-native \ + bash-completion-native \ bzip2-native \ chrpath-native \ diffstat-native \ ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] native: Improve ${PN}-XXX package name handling 2025-01-06 16:09 [PATCH 1/4] util-linux: Improve PACKAGES_DYNAMIC handling for util-linux-native Richard Purdie 2025-01-06 16:09 ` [PATCH 2/4] coreutils: Improve core-utils-native dependency handling Richard Purdie 2025-01-06 16:09 ` [PATCH 3/4] bitbake.conf: Add bash-completion-native to ASSUME_PROVIDED Richard Purdie @ 2025-01-06 16:09 ` Richard Purdie 2025-01-13 13:45 ` [OE-core] " Quentin Schulz 2 siblings, 1 reply; 6+ messages in thread From: Richard Purdie @ 2025-01-06 16:09 UTC (permalink / raw) To: openembedded-core If a recipe has something like: RPROVIDES:${PN}-xxx = "yyy" then the current code will turn this into: RPROVIDES:${BPN}-native-xxx = "yyy-native" which can lead to errors. Add in some handling for this special case in the class extension code. The corresponding entry in PACAGES is correctly remapped, the variables aren't remapped to match though. Note that merging this does trigger new dependencies to be exposed, some of which can't be met or are incorrect. These need to be fixed on a case by case basis. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- meta/classes-recipe/native.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass index d9651a7f22d..0fad42a5a45 100644 --- a/meta/classes-recipe/native.bbclass +++ b/meta/classes-recipe/native.bbclass @@ -158,7 +158,12 @@ python native_virtclass_handler () { newdeps.append(dep.replace(pn, bpn) + "-native") else: newdeps.append(dep) - d.setVar(varname, " ".join(newdeps)) + output_varname = varname + # Handle ${PN}-xxx -> ${BPN}-xxx-native + if suffix != "${PN}" and "${PN}" in suffix: + output_varname = varname.replace("${PN}", "${BPN}") + "-native" + d.renameVar(varname, output_varname) + d.setVar(output_varname, " ".join(newdeps)) map_dependencies("DEPENDS", e.data, selfref=False) for pkg in e.data.getVar("PACKAGES", False).split(): ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH 4/4] native: Improve ${PN}-XXX package name handling 2025-01-06 16:09 ` [PATCH 4/4] native: Improve ${PN}-XXX package name handling Richard Purdie @ 2025-01-13 13:45 ` Quentin Schulz 2025-01-13 14:05 ` Richard Purdie 0 siblings, 1 reply; 6+ messages in thread From: Quentin Schulz @ 2025-01-13 13:45 UTC (permalink / raw) To: richard.purdie, openembedded-core; +Cc: docs Cc docs On 1/6/25 5:09 PM, Richard Purdie via lists.openembedded.org wrote: > If a recipe has something like: > > RPROVIDES:${PN}-xxx = "yyy" > > then the current code will turn this into: > > RPROVIDES:${BPN}-native-xxx = "yyy-native" > > which can lead to errors. Add in some handling for this special case in the class > extension code. > > The corresponding entry in PACAGES is correctly remapped, the variables aren't > remapped to match though. > > Note that merging this does trigger new dependencies to be exposed, some of which > can't be met or are incorrect. These need to be fixed on a case by case basis. > > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> > --- > meta/classes-recipe/native.bbclass | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass > index d9651a7f22d..0fad42a5a45 100644 > --- a/meta/classes-recipe/native.bbclass > +++ b/meta/classes-recipe/native.bbclass > @@ -158,7 +158,12 @@ python native_virtclass_handler () { > newdeps.append(dep.replace(pn, bpn) + "-native") > else: > newdeps.append(dep) > - d.setVar(varname, " ".join(newdeps)) > + output_varname = varname > + # Handle ${PN}-xxx -> ${BPN}-xxx-native > + if suffix != "${PN}" and "${PN}" in suffix: > + output_varname = varname.replace("${PN}", "${BPN}") + "-native" > + d.renameVar(varname, output_varname) > + d.setVar(output_varname, " ".join(newdeps)) > This seems like a bug we should document in known issues in old release notes? I assume we may patch currently supported releases so stable dot releases may receive the patch, but outdated releases would be unpatched forever. I guess we can say that the fix is to have each of RDEPENDS, RRECOMMENDS, RSUGGESTS, RPROVIDES, RREPLACES, PACKAGES overrides and PACKAGES_DYNAMIC to have ${BPN}-xxx+${BPN}-xxx-native instead of just ${PN}-xxx? Is that an appropriate suggestion? I'm bringing this up because we have a Known issues section in the migration guides which is pretty much empty right now. I don't know what we should actually put in there but this seems like a candidate? What do you think? Antonin? Cheers, Quentin ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH 4/4] native: Improve ${PN}-XXX package name handling 2025-01-13 13:45 ` [OE-core] " Quentin Schulz @ 2025-01-13 14:05 ` Richard Purdie 0 siblings, 0 replies; 6+ messages in thread From: Richard Purdie @ 2025-01-13 14:05 UTC (permalink / raw) To: Quentin Schulz, openembedded-core; +Cc: docs On Mon, 2025-01-13 at 14:45 +0100, Quentin Schulz wrote: > Cc docs > > On 1/6/25 5:09 PM, Richard Purdie via lists.openembedded.org wrote: > > If a recipe has something like: > > > > RPROVIDES:${PN}-xxx = "yyy" > > > > then the current code will turn this into: > > > > RPROVIDES:${BPN}-native-xxx = "yyy-native" > > > > which can lead to errors. Add in some handling for this special case in the class > > extension code. > > > > The corresponding entry in PACAGES is correctly remapped, the variables aren't > > remapped to match though. > > > > Note that merging this does trigger new dependencies to be exposed, some of which > > can't be met or are incorrect. These need to be fixed on a case by case basis. > > > > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> > > --- > > meta/classes-recipe/native.bbclass | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass > > index d9651a7f22d..0fad42a5a45 100644 > > --- a/meta/classes-recipe/native.bbclass > > +++ b/meta/classes-recipe/native.bbclass > > @@ -158,7 +158,12 @@ python native_virtclass_handler () { > > newdeps.append(dep.replace(pn, bpn) + "-native") > > else: > > newdeps.append(dep) > > - d.setVar(varname, " ".join(newdeps)) > > + output_varname = varname > > + # Handle ${PN}-xxx -> ${BPN}-xxx-native > > + if suffix != "${PN}" and "${PN}" in suffix: > > + output_varname = varname.replace("${PN}", "${BPN}") + "-native" > > + d.renameVar(varname, output_varname) > > + d.setVar(output_varname, " ".join(newdeps)) > > > > This seems like a bug we should document in known issues in old release > notes? > > I assume we may patch currently supported releases so stable dot > releases may receive the patch, but outdated releases would be unpatched > forever. The change in behaviour is enough that I don't think we should be backporting this to stable releases. The issue is rare and seemingly not being run into by many people in the wild. > I guess we can say that the fix is to have each of RDEPENDS, > RRECOMMENDS, RSUGGESTS, RPROVIDES, RREPLACES, PACKAGES overrides and > PACKAGES_DYNAMIC to have ${BPN}-xxx+${BPN}-xxx-native instead of just > ${PN}-xxx? Is that an appropriate suggestion? We'd probably suggest that users "spell out" the native mappings explicitly for any problems encountered. I'd argue they should be mapped correctly rather than introducing the "bad" naming. > I'm bringing this up because we have a Known issues section in the > migration guides which is pretty much empty right now. I don't know what > we should actually put in there but this seems like a candidate? What do > you think? Antonin? That is something we should consider, yes. Cheers, Richard ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-01-13 14:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06 16:09 [PATCH 1/4] util-linux: Improve PACKAGES_DYNAMIC handling for util-linux-native Richard Purdie
2025-01-06 16:09 ` [PATCH 2/4] coreutils: Improve core-utils-native dependency handling Richard Purdie
2025-01-06 16:09 ` [PATCH 3/4] bitbake.conf: Add bash-completion-native to ASSUME_PROVIDED Richard Purdie
2025-01-06 16:09 ` [PATCH 4/4] native: Improve ${PN}-XXX package name handling Richard Purdie
2025-01-13 13:45 ` [OE-core] " Quentin Schulz
2025-01-13 14:05 ` Richard Purdie
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.