wireshark: Fix do_compile error
PATCH v2 1/1 wireshark: Fix do_compile error
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(-)
meta-networking/recipes-support/wireshark/wireshark_4.6.3.bb +3 -2
@@ -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() {
Signature · 1 line
2.43.0