Skip to contentSkip to conversation

wireshark: Fix do_compile error

PATCH New Liu Yiding 1 participant 1 message Feb 6

lore
Share & tools
lore

Liu Yiding

author
#0 lore raw

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"

---
 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
index 2cf9693f5c..897be7adfa 100644
@@ -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