mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
Similar to what native and staging is doing since: https://git.openembedded.org/openembedded-core/commit/meta/classes/native.bbclass?id=d6c7b9f4f0e61fa6546d3644e27abe3e96f597e2 https://git.openembedded.org/openembedded-core/commit/meta/classes/staging.bbclass?id=1cf62882bbac543960e4815d117ffce0e53bda07 Cross task outputs can call native dependencies and even when cross recipe output doesn't change it might produce different results when the called native dependency is changed, e.g. clang-cross-${TARGET_ARCH} contains symlink to clang binary from clang-native, but when clang-native outhash is changed, clang-cross-${TARGET_ARCH} will still be considered equivalent and target recipes aren't rebuilt with new clang binary, see work around in https://github.com/kraj/meta-clang/pull/1140 to make target recipes to depend directly not only on clang-cross-${TARGET_ARCH} but clang-native as well. I have added a small testcase in meta-selftest which demostrates this issue. Not included in this change, but will send it if useful. openembedded-core $ ls -1 meta-selftest/recipes-devtools/hashequiv-test/ print-datetime-link-cross.bb print-datetime-link-native.bb print-datetime-native.bb print-datetime-usecross.bb print-datetime-usenative.bb print-datetime-native provides script which prints defined PRINT_DATETIME variable. print-datetime-link-native and print-datetime-link-cross both provide a symlink to the script from print-datetime-native. print-datetime-usenative and print-datetime-usecross are target recipes using the native and cross versions of print-datetime-link-* recipe. # clean build all is rebuilt: $ bitbake -k print-datetime-usenative print-datetime-usecross WARNING: print-datetime-native-1.0-r0 do_install: print-datetime-native current DATETIME in script is 2025-11-13_20_05 WARNING: print-datetime-link-native-1.0-r0 do_install: print-datetime-link-native current DATETIME in symlink is 2025-11-13_20_05 WARNING: print-datetime-link-cross-x86_64-1.0-r0 do_install: print-datetime-link-cross-x86_64 current DATETIME in symlink is 2025-11-13_20_05 WARNING: print-datetime-usenative-1.0-r0 do_install: print-datetime-usenative current DATETIME from print-datetime-link is 2025-11-13_20_05 WARNING: print-datetime-usecross-1.0-r0 do_install: print-datetime-usecross current DATETIME from print-datetime-link is 2025-11-13_20_05 # keep sstate-cache and hashserv.db: # print-datetime-usenative is correctly rebuilt, because print-datetime-link-native has different hash (because print-datetime-native hash changed) # print-datetime-usecross wasn't rebuilt, because print-datetime-link-cross-x86_64 doesn't include the changed hash of print-datetime-native $ bitbake -k print-datetime-usenative print-datetime-usecross WARNING: print-datetime-native-1.0-r0 do_install: print-datetime-native current DATETIME in script is 2025-11-13_20_07 WARNING: print-datetime-link-native-1.0-r0 do_install: print-datetime-link-native current DATETIME in symlink is 2025-11-13_20_07 WARNING: print-datetime-link-cross-x86_64-1.0-r0 do_install: print-datetime-link-cross-x86_64 current DATETIME in symlink is 2025-11-13_20_07 WARNING: print-datetime-usenative-1.0-r0 do_install: print-datetime-usenative current DATETIME from print-datetime-link is 2025-11-13_20_07 It's because print-datetime-link-cross-x86_64 depsig doesn't include print-datetime-native signature: $ cat tmp/work/x86_64-linux/print-datetime-link-cross-x86_64/1.0/temp/depsig.do_populate_sysroot OEOuthashBasic 18 SSTATE_PKGSPEC=sstate:print-datetime-link-cross-x86_64:x86_64-oe-linux:1.0:r0:x86_64:14: task=populate_sysroot drwx . drwx ./recipe-sysroot-native drwx ./recipe-sysroot-native/sysroot-providers -rw- 32 19fbeb373f781c2504453c1ca04dab018a7bc8388c87f4bbc59589df31523d07 ./recipe-sysroot-native/sysroot-providers/print-datetime-link-cross-x86_64 drwx ./recipe-sysroot-native/usr drwx ./recipe-sysroot-native/usr/bin drwx ./recipe-sysroot-native/usr/bin/x86_64-oe-linux lrwx ./recipe-sysroot-native/usr/bin/x86_64-oe-linux/print-datetime-link -> ../print-datetime While print-datetime-link-native doesn't have this issue, because print-datetime-native signature is there: $ cat tmp/work/x86_64-linux/print-datetime-link-native/1.0/temp/depsig.do_populate_sysroot OEOuthashBasic 18 print-datetime-native: 60f2734a63d708489570ca719413b4662f8368abc9f4760a279a0a5481e4a17b quilt-native: 65d78a7a5b5cbbf0969798efe558ca28e7ef058f4232fcff266912d16f67a8b8 SSTATE_PKGSPEC=sstate:print-datetime-link-native:x86_64-linux:1.0:r0:x86_64:14: task=populate_sysroot drwx . drwx ./recipe-sysroot-native drwx ./recipe-sysroot-native/sysroot-providers -rw- 26 3d5458be834b2d0e4c65466b9b877d6028ae2210a56399284a23144818666f10 ./recipe-sysroot-native/sysroot-providers/print-datetime-link-native drwx ./recipe-sysroot-native/usr drwx ./recipe-sysroot-native/usr/bin lrwx ./recipe-sysroot-native/usr/bin/print-datetime-link -> print-datetime With the cross.bbclass fix the link-cross recipe has a checksum from native recipe as well: $ cat tmp/work/x86_64-linux/print-datetime-link-cross-x86_64/1.0/temp/depsig.do_populate_sysroot OEOuthashBasic 18 print-datetime-native: 9ceb6c27342eae6b8da86c84685af38fb8927ccc19979aae75b8b1e444b11c5c quilt-native: 65d78a7a5b5cbbf0969798efe558ca28e7ef058f4232fcff266912d16f67a8b8 SSTATE_PKGSPEC=sstate:print-datetime-link-cross-x86_64:x86_64-oe-linux:1.0:r0:x86_64:14: task=populate_sysroot drwx . drwx ./recipe-sysroot-native drwx ./recipe-sysroot-native/sysroot-providers -rw- 32 19fbeb373f781c2504453c1ca04dab018a7bc8388c87f4bbc59589df31523d07 ./recipe-sysroot-native/sysroot-providers/print-datetime-link-cross-x86_64 drwx ./recipe-sysroot-native/usr drwx ./recipe-sysroot-native/usr/bin drwx ./recipe-sysroot-native/usr/bin/x86_64-oe-linux lrwx ./recipe-sysroot-native/usr/bin/x86_64-oe-linux/print-datetime-link -> ../print-datetime And print-datetime-usecross is correctly rebuilt whenever print-datetime-native output is different. (From OE-Core rev: c15faee8854e85e02693a041d88326f30b24ee92) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> |
||
|---|---|---|
| .. | ||
| allarch.bbclass | ||
| archiver.bbclass | ||
| autotools-brokensep.bbclass | ||
| autotools.bbclass | ||
| baremetal-image.bbclass | ||
| base.bbclass | ||
| bash-completion.bbclass | ||
| bin_package.bbclass | ||
| binconfig-disabled.bbclass | ||
| binconfig.bbclass | ||
| buildhistory.bbclass | ||
| buildstats-summary.bbclass | ||
| buildstats.bbclass | ||
| cargo_common.bbclass | ||
| cargo.bbclass | ||
| ccache.bbclass | ||
| ccmake.bbclass | ||
| chrpath.bbclass | ||
| cmake.bbclass | ||
| cml1.bbclass | ||
| compress_doc.bbclass | ||
| copyleft_compliance.bbclass | ||
| copyleft_filter.bbclass | ||
| core-image.bbclass | ||
| cpan_build.bbclass | ||
| cpan-base.bbclass | ||
| cpan.bbclass | ||
| create-spdx.bbclass | ||
| cross-canadian.bbclass | ||
| cross.bbclass | ||
| crosssdk.bbclass | ||
| cve-check.bbclass | ||
| debian.bbclass | ||
| deploy.bbclass | ||
| devicetree.bbclass | ||
| devshell.bbclass | ||
| devtool-source.bbclass | ||
| devupstream.bbclass | ||
| distro_features_check.bbclass | ||
| distrooverrides.bbclass | ||
| dos2unix.bbclass | ||
| externalsrc.bbclass | ||
| extrausers.bbclass | ||
| features_check.bbclass | ||
| fontcache.bbclass | ||
| fs-uuid.bbclass | ||
| gconf.bbclass | ||
| gettext.bbclass | ||
| gi-docgen.bbclass | ||
| gio-module-cache.bbclass | ||
| glide.bbclass | ||
| gnomebase.bbclass | ||
| go-mod.bbclass | ||
| go-ptest.bbclass | ||
| go.bbclass | ||
| goarch.bbclass | ||
| gobject-introspection-data.bbclass | ||
| gobject-introspection.bbclass | ||
| grub-efi-cfg.bbclass | ||
| grub-efi.bbclass | ||
| gsettings.bbclass | ||
| gtk-doc.bbclass | ||
| gtk-icon-cache.bbclass | ||
| gtk-immodules-cache.bbclass | ||
| icecc.bbclass | ||
| image_types_wic.bbclass | ||
| image_types.bbclass | ||
| image-artifact-names.bbclass | ||
| image-buildinfo.bbclass | ||
| image-combined-dbg.bbclass | ||
| image-container.bbclass | ||
| image-live.bbclass | ||
| image-postinst-intercepts.bbclass | ||
| image.bbclass | ||
| insane.bbclass | ||
| kernel-arch.bbclass | ||
| kernel-artifact-names.bbclass | ||
| kernel-devicetree.bbclass | ||
| kernel-fitimage.bbclass | ||
| kernel-grub.bbclass | ||
| kernel-module-split.bbclass | ||
| kernel-uboot.bbclass | ||
| kernel-uimage.bbclass | ||
| kernel-yocto.bbclass | ||
| kernel.bbclass | ||
| kernelsrc.bbclass | ||
| lib_package.bbclass | ||
| libc-package.bbclass | ||
| license_image.bbclass | ||
| license.bbclass | ||
| linux-dummy.bbclass | ||
| linux-kernel-base.bbclass | ||
| linuxloader.bbclass | ||
| live-vm-common.bbclass | ||
| logging.bbclass | ||
| manpages.bbclass | ||
| mcextend.bbclass | ||
| meson-routines.bbclass | ||
| meson.bbclass | ||
| metadata_scm.bbclass | ||
| migrate_localcount.bbclass | ||
| mime-xdg.bbclass | ||
| mime.bbclass | ||
| mirrors.bbclass | ||
| module-base.bbclass | ||
| module.bbclass | ||
| multilib_global.bbclass | ||
| multilib_header.bbclass | ||
| multilib_script.bbclass | ||
| multilib.bbclass | ||
| native.bbclass | ||
| nativesdk.bbclass | ||
| nopackages.bbclass | ||
| npm.bbclass | ||
| oelint.bbclass | ||
| overlayfs-etc.bbclass | ||
| overlayfs.bbclass | ||
| own-mirrors.bbclass | ||
| package_deb.bbclass | ||
| package_ipk.bbclass | ||
| package_pkgdata.bbclass | ||
| package_rpm.bbclass | ||
| package_tar.bbclass | ||
| package.bbclass | ||
| packagedata.bbclass | ||
| packagegroup.bbclass | ||
| patch.bbclass | ||
| perl-version.bbclass | ||
| perlnative.bbclass | ||
| pixbufcache.bbclass | ||
| pkgconfig.bbclass | ||
| populate_sdk_base.bbclass | ||
| populate_sdk_ext.bbclass | ||
| populate_sdk.bbclass | ||
| prexport.bbclass | ||
| primport.bbclass | ||
| ptest-gnome.bbclass | ||
| ptest-perl.bbclass | ||
| ptest.bbclass | ||
| pypi.bbclass | ||
| python_flit_core.bbclass | ||
| python_pep517.bbclass | ||
| python_poetry_core.bbclass | ||
| python_pyo3.bbclass | ||
| python_setuptools_build_meta.bbclass | ||
| python_setuptools3_rust.bbclass | ||
| python3-dir.bbclass | ||
| python3native.bbclass | ||
| python3targetconfig.bbclass | ||
| qemu.bbclass | ||
| qemuboot.bbclass | ||
| recipe_sanity.bbclass | ||
| relative_symlinks.bbclass | ||
| relocatable.bbclass | ||
| remove-libtool.bbclass | ||
| report-error.bbclass | ||
| rm_work_and_downloads.bbclass | ||
| rm_work.bbclass | ||
| rootfs_deb.bbclass | ||
| rootfs_ipk.bbclass | ||
| rootfs_rpm.bbclass | ||
| rootfs-postcommands.bbclass | ||
| rootfsdebugfiles.bbclass | ||
| rust-bin.bbclass | ||
| rust-common.bbclass | ||
| rust.bbclass | ||
| sanity.bbclass | ||
| scons.bbclass | ||
| setuptools3_legacy.bbclass | ||
| setuptools3-base.bbclass | ||
| setuptools3.bbclass | ||
| sign_ipk.bbclass | ||
| sign_package_feed.bbclass | ||
| sign_rpm.bbclass | ||
| siteconfig.bbclass | ||
| siteinfo.bbclass | ||
| sstate.bbclass | ||
| staging.bbclass | ||
| syslinux.bbclass | ||
| systemd-boot-cfg.bbclass | ||
| systemd-boot.bbclass | ||
| systemd.bbclass | ||
| terminal.bbclass | ||
| testexport.bbclass | ||
| testimage.bbclass | ||
| testsdk.bbclass | ||
| texinfo.bbclass | ||
| toaster.bbclass | ||
| toolchain-scripts-base.bbclass | ||
| toolchain-scripts.bbclass | ||
| typecheck.bbclass | ||
| uboot-config.bbclass | ||
| uboot-extlinux-config.bbclass | ||
| uboot-sign.bbclass | ||
| uninative.bbclass | ||
| update-alternatives.bbclass | ||
| update-rc.d.bbclass | ||
| upstream-version-is-even.bbclass | ||
| useradd_base.bbclass | ||
| useradd-staticids.bbclass | ||
| useradd.bbclass | ||
| utility-tasks.bbclass | ||
| utils.bbclass | ||
| vala.bbclass | ||
| waf.bbclass | ||
| xmlcatalog.bbclass | ||
| yocto-check-layer.bbclass | ||