From cb3020653421d46fb5308b59da1d9a1e83d99c1a Mon Sep 17 00:00:00 2001 From: Vinicius Aquino Date: Mon, 12 Apr 2021 17:25:38 -0300 Subject: weston-init: Rework uncomment function logic Fix error "Commented setting '#use-g2d=1' not found" when building for some imx machines. Signed-off-by: Vinicius Aquino --- recipes-graphics/wayland/weston-init.bbappend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 8e590965..22ffb7ff 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -40,7 +40,7 @@ INI_UNCOMMENT_ASSIGNMENTS_append_mx8mq = " \ " uncomment() { - if ! (grep "^#$1" $2); then + if ! grep -q "^#$1" $2 && ! grep -q "^$1" $2; then bbfatal "Commented setting '#$1' not found in file $2" fi sed -i -e 's,^#'"$1"','"$1"',g' $2 -- cgit v1.2.3-54-g00ecf