coreutils: Fix file-rdeps for single-binary

Fixed:
DISTRO_FEATURES:append = " ptest"
PACKAGECONFIG:append:pn-coreutils = " single-binary"

$ bitbake coreutils
ERROR: coreutils-9.6-r0 do_package_qa: QA Issue: /usr/lib/coreutils/ptest/src/yes contained in package coreutils-ptest requires /path/to//tmp/work/core2-64-poky-linux/coreutils/9.6/build/src/coreutils, but no providers found in RDEPENDS:coreutils-ptest? [file-rdeps]

(From OE-Core rev: 5174ec4a82a66b49ff7a8988ab52731b775bffb6)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Robert Yang 2025-05-13 03:19:00 -07:00 committed by Richard Purdie
parent 7d61d49a2f
commit e1d0f2e46c

View File

@ -211,7 +211,14 @@ do_install_ptest () {
# Tweak test d_type-check to use python3 instead of python # Tweak test d_type-check to use python3 instead of python
sed -i "1s@.*@#!/usr/bin/python3@" ${D}${PTEST_PATH}/tests/d_type-check sed -i "1s@.*@#!/usr/bin/python3@" ${D}${PTEST_PATH}/tests/d_type-check
# Fix for single-binary
for prog in ${D}${PTEST_PATH}/src/*; do
if [ -f $prog ]; then
sed -i "1s@#!.*/src/coreutils @#!${bindir}/coreutils @" $prog
fi
done
# handle multilib # handle multilib
sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
} }