diffoscope uses libmagic and it was searching in file-native's sysroot
for the magic file. Wrap it and set MAGIC in the environment to
ensure the file is found correctly and avoid build failures.

Signed-off-by: Richard Purdie <[email protected]>
---
 meta/recipes-support/diffoscope/diffoscope_167.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-support/diffoscope/diffoscope_167.bb 
b/meta/recipes-support/diffoscope/diffoscope_167.bb
index 9ce59a0ba01..1882d549a4d 100644
--- a/meta/recipes-support/diffoscope/diffoscope_167.bb
+++ b/meta/recipes-support/diffoscope/diffoscope_167.bb
@@ -14,4 +14,8 @@ RDEPENDS_${PN} += "binutils vim squashfs-tools 
python3-libarchive-c python3-magi
 # Dependencies don't build for musl
 COMPATIBLE_HOST_libc-musl = 'null'
 
+do_install_append_class-native() {
+       create_wrapper ${D}${bindir}/diffoscope 
MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc
+}
+
 BBCLASSEXTEND = "native"
-- 
2.27.0

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

Reply via email to