From: Alexander Kanavin <[email protected]> Sometimes upstreams hardcode directories that match users' own home directories, which triggers a false positive in the test:
https://lists.yoctoproject.org/g/yocto/message/66612 It's very hard to programmatically establish what is hardcoded in the original source, and what is a genuine build contamination, so this adds a way to specify such occurences in recipes. Signed-off-by: Alexander Kanavin <[email protected]> --- meta/classes-global/insane.bbclass | 4 ++-- meta/recipes-devtools/perl/perl_5.42.2.bb | 2 ++ meta/recipes-devtools/python/python3-numpy_2.4.6.bb | 2 ++ meta/recipes-devtools/python/python3-pytest_9.1.0.bb | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index 4250331af1..a788817c89 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -445,9 +445,9 @@ def package_qa_check_buildpaths(path, name, d, elf): if tmpdir in file_content: path = package_qa_clean_path(path, d, name) oe.qa.handle_error("buildpaths", "File %s in package %s contains reference to TMPDIR" % (path, name), d) - if homedir and homedir in file_content: + if homedir and homedir in file_content and not homedir.decode() in (d.getVar("OEQA_BUILDPATHS_SKIP") or "").split(): path = package_qa_clean_path(path, d, name) - oe.qa.handle_error("buildpaths", "File %s in package %s contains reference to the build host HOME directory" % (path, name), d) + oe.qa.handle_error("buildpaths", "File %s in package %s contains a reference to the build host HOME directory. If upstream hardcodes a directory path that matches your home, you can set OEQA_BUILDPATHS_SKIP = \"%s\" in the recipe." % (path, name, homedir.decode()), d) QAPATHTEST[xorg-driver-abi] = "package_qa_check_xorg_driver_abi" diff --git a/meta/recipes-devtools/perl/perl_5.42.2.bb b/meta/recipes-devtools/perl/perl_5.42.2.bb index f076431aff..f1f026579b 100644 --- a/meta/recipes-devtools/perl/perl_5.42.2.bb +++ b/meta/recipes-devtools/perl/perl_5.42.2.bb @@ -448,3 +448,5 @@ SSTATE_HASHEQUIV_FILEMAP = " \ populate_sysroot:*/lib*/perl5/config.sh:${TMPDIR} \ populate_sysroot:*/lib*/perl5/config.sh:${COREBASE} \ " + +OEQA_BUILDPATHS_SKIP = "/home/alex" diff --git a/meta/recipes-devtools/python/python3-numpy_2.4.6.bb b/meta/recipes-devtools/python/python3-numpy_2.4.6.bb index 2c892e9756..278e838820 100644 --- a/meta/recipes-devtools/python/python3-numpy_2.4.6.bb +++ b/meta/recipes-devtools/python/python3-numpy_2.4.6.bb @@ -84,3 +84,5 @@ RDEPENDS:${PN}-ptest += "\ " BBCLASSEXTEND = "native nativesdk" + +OEQA_BUILDPATHS_SKIP = "/home/alex" diff --git a/meta/recipes-devtools/python/python3-pytest_9.1.0.bb b/meta/recipes-devtools/python/python3-pytest_9.1.0.bb index 9180e7bf1f..b61e86cd00 100644 --- a/meta/recipes-devtools/python/python3-pytest_9.1.0.bb +++ b/meta/recipes-devtools/python/python3-pytest_9.1.0.bb @@ -33,3 +33,5 @@ ALTERNATIVE_LINK_NAME[py.test] = "${bindir}/py.test" ALTERNATIVE_TARGET[py.test] = "${bindir}/py.test" BBCLASSEXTEND = "native nativesdk" + +OEQA_BUILDPATHS_SKIP = "/home/user" -- 2.47.3
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#239692): https://lists.openembedded.org/g/openembedded-core/message/239692 Mute This Topic: https://lists.openembedded.org/mt/120001458/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
