From patchwork Thu Oct 22 11:26:41 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 101666 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.20635.1792668407166233504 for ; Thu, 22 Oct 2026 04:26:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=KZzk2hpe; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.53, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4a1dede3c2cso22170855e9.2 for ; Thu, 22 Oct 2026 04:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1792668405; x=1793273205; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=d5z0cQOa5DargJooLSw/otRQ1XkSfEfWGdPGwCmWK64=; b=KZzk2hpeXIbXkc4hz3myH80Z6GHmxmFfF5MFollxdDTyRFUWoA3L1wv942nXJaNdOM 0dNBnZf0emm5ujfcjpo5gb6eHSO+DLBWLUf+XG18cah9+TjM09+wP87mCraxibVNqWXz lQfLd03ooUKbeIUD8Oq1lIo5Gwl/zxu8Rtpt0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792668405; x=1793273205; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=d5z0cQOa5DargJooLSw/otRQ1XkSfEfWGdPGwCmWK64=; b=Oiv4ma7AeKTH4im07jzGURf6ro5qSpCeOg3PP9vRa+gmBN7O9QUNvVifLrjBA9lPWz BBTYlMeFA2odZNzHO5UWStKF2bLFs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b1-4a209945818mr22642415e9.32.1792668404925; Thu, 22 Oct 2026 04:26:44 -0700 (PDT) Return-Path: Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:b8c1:c201:8aca:1e39]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a203a0e64esm63874605e9.3.2026.10.22.04.26.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2026 04:26:43 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH] populate_sdk_ext: Fix locale error handling in SDK Date: Thu, 22 Oct 2026 12:26:41 +0100 Message-ID: <20261022112642.3481476-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 22 Oct 2026 11:26:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/248440 During automated testing we occasionally we see the error: "ERROR: the installer requires the en_US.UTF-8 locale to be installed (but not selected), please install it first" This is puzzling as the locale *is* installed. The use of -q with grep in a pipeline is potentially problematic as grep can exit early and cause a pipefail/SIGPIPE. Tweak the code to avoid it and a few other issues (add quoting, handle the "." correctly, match a whole line). [YOCTO #16198] Signed-off-by: Richard Purdie --- meta/classes-recipe/populate_sdk_ext.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-recipe/populate_sdk_ext.bbclass b/meta/classes-recipe/populate_sdk_ext.bbclass index a1188da9697..00b41ec0cbf 100644 --- a/meta/classes-recipe/populate_sdk_ext.bbclass +++ b/meta/classes-recipe/populate_sdk_ext.bbclass @@ -678,7 +678,7 @@ sdk_ext_preinst() { fi # Check setting of LC_ALL set above canonicalised_locale=`echo $LC_ALL | sed 's/UTF-8/utf8/'` - if ! locale -a | grep -q $canonicalised_locale ; then + if ! locale -a | grep -Fx "$canonicalised_locale" > /dev/null ; then echo "ERROR: the installer requires the $LC_ALL locale to be installed (but not selected), please install it first" exit 1 fi