If there is no mate_grammar.c, it will cause exit code 1 by "test -e" as following:
WARNING: exit code 1 from a shell command. So use "if" instead of "test" Signed-off-by: Liu Yiding <[email protected]> --- meta-networking/recipes-support/wireshark/wireshark_4.6.3.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-networking/recipes-support/wireshark/wireshark_4.6.3.bb b/meta-networking/recipes-support/wireshark/wireshark_4.6.3.bb index 2cf9693f5c..897be7adfa 100644 --- a/meta-networking/recipes-support/wireshark/wireshark_4.6.3.bb +++ b/meta-networking/recipes-support/wireshark/wireshark_4.6.3.bb @@ -71,8 +71,9 @@ do_compile:append:class-target() { sed -i -e "s:** source file.*::g" ${B}/wiretap/busmaster_parser.c sed -i -e "s:** source file.*::g" ${B}/epan/protobuf_lang_parser.c sed -i -e "s:** source file.*::g" ${B}/epan/dfilter/grammar.c - test -e ${B}/plugins/epan/mate/mate_grammar.c && \ - sed -i -e "s:** source file.*::g" ${B}/plugins/epan/mate/mate_grammar.c + if [ -f "${B}/plugins/epan/mate/mate_grammar.c" ]; then + sed -i -e 's:** source file.*::g' "${B}/plugins/epan/mate/mate_grammar.c" + fi } do_install:append:class-native() { -- 2.43.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#124229): https://lists.openembedded.org/g/openembedded-devel/message/124229 Mute This Topic: https://lists.openembedded.org/mt/117668476/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
