Skip to contentSkip to conversation

no-gplv3: Add workarounds for update-alternatives and ptest

PATCH In review Richard Purdie 2 participants 4 messages Feb 9, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 no-gplv3: Add workarounds for update-alternatives and ptest

Document the tribal knowledge that we have to disable ptests for gplv3.

Also document the workaround for update-alternatives issues with bash and opkg-utils.

As with anything in this file, the exclusions come at a cost.

---
 meta/conf/distro/include/no-gplv3.inc | 6 ++++++
 1 file changed, 6 insertions(+)
meta/conf/distro/include/no-gplv3.inc +6 -0
index bb2e836f982..571e7f882d9 100644
@@ -5,6 +5,9 @@
 # The intent is to allow some images/configurations to build, not everything. There
 # will be a cost in reduced functionality.
 
+# Many ptests are problematic due to bash dependencies, need to disable
+DISTRO_FEATURES:remove = "ptest"
+
 # Settings for full-cmdline
 RDEPENDS:packagegroup-core-full-cmdline-utils:remove = "bash bc coreutils cpio ed findutils gawk grep mc mc-fish mc-helpers mc-helpers-perl sed tar time"
 RDEPENDS:packagegroup-core-full-cmdline-dev-utils:remove = "diffutils m4 make patch"
@@ -26,3 +29,6 @@ CORE_IMAGE_BASE_INSTALL:remove:pn-core-image-weston = "matchbox-terminal"
 # Some python-tests use bash outside of ptest
 RDEPENDS:${PN}-tests:remove:class-target:pn-python3 = "${MLPREFIX}bash"
 INSANE_SKIP:${PN}-tests:pn-python3 = "file-rdeps"
+
+# Assume opkg-utils is only for update-alternatives
+RDEPENDS:${PN}:remove:pn-opkg-utils = "bash"
Signature · 1 line
2.40.1
#1 lore raw

PATCH 2/2 gcc-runtime: Avoid python dependency for mingw

We can't add a python dependency on mingw since we don't support building python there at this time so avoid that dependency for that case.

---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +3 -1
index 004deb6e41f..9dd399d1b14 100644
@@ -191,7 +191,9 @@ FILES:${PN}-dbg += "\
     ${datadir}/gdb/auto-load \
 "
 # Needed by libstdcxx pretty printer
-RDEPENDS:${PN}-dbg += "python3-datetime"
+PYDATETIME = "python3-datetime"
+PYDATETIME:mingw32 = ""
+RDEPENDS:${PN}-dbg += "${PYDATETIME}"
 
 FILES:libg2c = "${target_libdir}/libg2c.so.*"
 SUMMARY:libg2c = "Companion runtime library for g77"
Signature · 1 line
2.40.1
#2 lore raw
In reply to Richard Purdie

I find DISTRO_FEATURES:remove = "ptest" item problematic. Ptests dependencies do not cause trouble if license restrictions are per-image, and I had long advocated placing the restrictions there, and not globally like was done previously in meta-gpl2 times.

So let's clarify: is no-gplv3.inc meant for the global license restriction, per image restriction or both? Should we rather have two files, where one includes the other and adds additional restrictions?

Alex

Quoted 46 lines · Richard Purdie

Document the tribal knowledge that we have to disable ptests for gplv3.

Also document the workaround for update-alternatives issues with bash and opkg-utils.

As with anything in this file, the exclusions come at a cost.

---
 meta/conf/distro/include/no-gplv3.inc | 6 ++++++
 1 file changed, 6 insertions(+)
meta/conf/distro/include/no-gplv3.inc +6 -1
index bb2e836f982..571e7f882d9 100644
@@ -5,6 +5,9 @@
 # The intent is to allow some images/configurations to build, not everything. There
 # will be a cost in reduced functionality.
 
+# Many ptests are problematic due to bash dependencies, need to disable
+DISTRO_FEATURES:remove = "ptest"
+
 # Settings for full-cmdline
 RDEPENDS:packagegroup-core-full-cmdline-utils:remove = "bash bc coreutils cpio ed findutils gawk grep mc mc-fish mc-helpers mc-helpers-perl sed tar time"
 RDEPENDS:packagegroup-core-full-cmdline-dev-utils:remove = "diffutils m4 make patch"
@@ -26,3 +29,6 @@ CORE_IMAGE_BASE_INSTALL:remove:pn-core-image-weston = "matchbox-terminal"
 # Some python-tests use bash outside of ptest
 RDEPENDS:${PN}-tests:remove:class-target:pn-python3 = "${MLPREFIX}bash"
 INSANE_SKIP:${PN}-tests:pn-python3 = "file-rdeps"
+
+# Assume opkg-utils is only for update-alternatives
+RDEPENDS:${PN}:remove:pn-opkg-utils = "bash"
--

2.40.1

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

#3 lore raw
Quoted 8 lines · Alexander Kanavin

I find DISTRO_FEATURES:remove = "ptest" item problematic. Ptests dependencies do not cause trouble if license restrictions are per-image, and I had long advocated placing the restrictions there, and not globally like was done previously in meta-gpl2 times.

So let's clarify: is no-gplv3.inc meant for the global license restriction, per image restriction or both? Should we rather have two files, where one includes the other and adds additional restrictions?

You're right, we should split this into two. I was torn on the ptest restriction and this kind of dilemma is why I'm a little reluctant to have this file in the first place.

The immediate problem is the minimal non-gplv3 recipe test breaking due to gcc-runtime gaining a python runtime dependency.

Cheers,

Richard