]> code.ossystems Code Review - meta-freescale.git/commitdiff
weston-init: Rework uncomment function logic
authorVinicius Aquino <voa.aquino@gmail.com>
Mon, 12 Apr 2021 20:25:38 +0000 (17:25 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Fri, 14 May 2021 20:47:00 +0000 (17:47 -0300)
Fix error "Commented setting '#use-g2d=1' not found"
when building for some imx machines.

Signed-off-by: Vinicius Aquino <voa.aquino@gmail.com>
(cherry picked from commit cb3020653421d46fb5308b59da1d9a1e83d99c1a)

recipes-graphics/wayland/weston-init.bbappend

index 8e590965d22174e12bc4f841c5693a046d34ed6e..22ffb7ffe9e2e6ac99ee042c98eb210ffc53a80e 100644 (file)
@@ -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