]> code.ossystems Code Review - openembedded-core.git/commitdiff
diffoscope: Ensure the correct magic file is used
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 23 Feb 2021 18:44:22 +0000 (18:44 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 23 Feb 2021 22:31:55 +0000 (22:31 +0000)
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 <richard.purdie@linuxfoundation.org>
meta/recipes-support/diffoscope/diffoscope_167.bb

index 9ce59a0ba01bd10a785216b02c10125c61239aa7..1882d549a4ddcc6e85161b746e8e4936058ce38a 100644 (file)
@@ -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"