Previously, a wrapper is used for file, which adds '--magic-file' option to it. But other components might use libmagic and in such case, if there's no MAGIC environent variable set correctly, things do not work. For example, rpmbuild makes use of libmagic and it requries MAGIC to be set correctly.
Signed-off-by: Chen Qi <[email protected]> --- meta/recipes-devtools/file/file_5.44.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/file/file_5.44.bb b/meta/recipes-devtools/file/file_5.44.bb index b3d821518a..d4b49341b7 100644 --- a/meta/recipes-devtools/file/file_5.44.bb +++ b/meta/recipes-devtools/file/file_5.44.bb @@ -32,6 +32,7 @@ EXTRA_OEMAKE:append:class-target = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/fi EXTRA_OEMAKE:append:class-nativesdk = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" FILES:${PN} += "${datadir}/misc/*.mgc" +FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/file.sh" do_compile:append:class-native() { oe_runmake check @@ -43,8 +44,10 @@ do_install:append:class-native() { } do_install:append:class-nativesdk() { - create_cmdline_wrapper ${D}/${bindir}/file \ - --magic-file ${datadir}/misc/magic.mgc + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + cat <<- EOF > ${D}${SDKPATHNATIVE}/environment-setup.d/file.sh + export MAGIC="$OECORE_NATIVE_SYSROOT${datadir}/misc/magic.mgc" + EOF } BBCLASSEXTEND = "native nativesdk" -- 2.17.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#176027): https://lists.openembedded.org/g/openembedded-core/message/176027 Mute This Topic: https://lists.openembedded.org/mt/96324205/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
