| Message ID | 20260804165803.598030-4-ross.burton@arm.com |
|---|---|
| State | Accepted, archived |
| Commit | d539873ea3480d39a0d5d14a8403ed979f62be48 |
| Headers | show |
| Series | [1/9] classes/cargo_common: move PKG_CONFIG_ALLOW_CROSS export to oe_cargo_fix_env | expand |
On Tue Aug 4, 2026 at 6:57 PM CEST, Ross Burton via lists.openembedded.org wrote: > Move the dependencies from cargo to cargo_common: if cargo is being used > in any way then you need to depend on cargo-native. > > Inherit rust instead of rust-common or rust-target-config: rust inherits > rust-common that inherits rust-target-config, and rust.bbclass simply > adds the dependency on rust-native. This means we can drop the explicit > rust dependencies to avoid duplication. > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- Hi Ross, It looks like this is breaking some selftests on the autobuilder: 2026-08-05 04:42:45,835 - oe-selftest - INFO - sstatetests.SStateHashSameSigs.test_sstate_sdk_arch_same_hash (subunit.RemotedTestCase) 2026-08-05 04:42:45,835 - oe-selftest - INFO - ... FAIL ... 2026-08-05 04:42:45,835 - oe-selftest - INFO - 6: 27/69 387/763 (108.57s) (2 failed) (sstatetests.SStateHashSameSigs.test_sstate_sdk_arch_same_hash) 2026-08-05 04:42:45,836 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last): File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/sstatetests.py", line 416, in test_sstate_sdk_arch_same_hash self.sstate_hashtest("aarch64") File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/sstatetests.py", line 401, in sstate_hashtest self.assertCountEqual(files1, files2) File "/usr/lib/python3.12/unittest/case.py", line 1216, in assertCountEqual self.fail(msg) File "/usr/lib/python3.12/unittest/case.py", line 715, in fail raise self.failureException(msg) AssertionError: Element counts were not equal: First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-3947568/tmp-sstatesamehash/stamps/all-poky-linux/adwaita-icon-theme/50.0.do_install.sigdata.cf83a7b1dadddfa2d6b44fc9390f46b27793c74918dbab4fe0048d924780eaf5' First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-3947568/tmp-sstatesamehash/stamps/all-poky-linux/adwaita-icon-theme/50.0.do_create_package_spdx.sigdata.f15f70b42ba9db4c88b4cd7b650dddf4f7b1dbbd911ff71f2c803f3b16d985ca' First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-3947568/tmp-sstatesamehash/stamps/all-poky-linux/adwaita-icon-theme/50.0.do_package.sigdata.81c59c71a0ee5154503141307ed14df0ac325fce8e0351ec308317e951ea66f1' First has 1, Second has 0: '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-3947568/tmp ... And I suspect it's also responsible of these two failures: 2026-08-05 04:39:10,815 - oe-selftest - INFO - sstatetests.SStateHashSameSigs.test_sstate_32_64_same_hash (subunit.RemotedTestCase) 2026-08-05 04:39:10,816 - oe-selftest - INFO - ... FAIL ... 2026-08-05 05:32:43,041 - oe-selftest - INFO - devtool.DevtoolIdeSdkTests.test_devtool_ide_sdk_code_meson_clang (subunit.RemotedTestCase) 2026-08-05 05:32:43,041 - oe-selftest - INFO - ... FAIL https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/4471 https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/4289 Can you have a look at the issue? Thanks, Mathieu
diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass index 31e655650cc..628dbc98f18 100644 --- a/meta/classes-recipe/cargo.bbclass +++ b/meta/classes-recipe/cargo.bbclass @@ -10,19 +10,10 @@ ## Cargo. inherit cargo_common -inherit rust-target-config # the binary we will use CARGO = "cargo" -# We need cargo to compile for the target -BASEDEPENDS:append = " cargo-native" - -# Ensure we get the right rust variant -DEPENDS:append:class-target = " rust-native ${RUSTLIB_DEP}" -DEPENDS:append:class-nativesdk = " rust-native ${RUSTLIB_DEP}" -DEPENDS:append:class-native = " rust-native" - # Enable build separation B = "${WORKDIR}/build" diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index 0fb6844d932..f58bd80728c 100644 --- a/meta/classes-recipe/cargo_common.bbclass +++ b/meta/classes-recipe/cargo_common.bbclass @@ -15,7 +15,9 @@ ## # add crate fetch support -inherit rust-common +inherit rust + +BASEDEPENDS:append = " cargo-native" # In case something fails in the build process, give a bit more feedback on # where the issue occured
Move the dependencies from cargo to cargo_common: if cargo is being used in any way then you need to depend on cargo-native. Inherit rust instead of rust-common or rust-target-config: rust inherits rust-common that inherits rust-target-config, and rust.bbclass simply adds the dependency on rust-native. This means we can drop the explicit rust dependencies to avoid duplication. Signed-off-by: Ross Burton <ross.burton@arm.com> --- meta/classes-recipe/cargo.bbclass | 9 --------- meta/classes-recipe/cargo_common.bbclass | 4 +++- 2 files changed, 3 insertions(+), 10 deletions(-)