From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AD99C369A4 for ; Tue, 8 Apr 2025 13:19:00 +0000 (UTC) Subject: Re: [yocto] warn if a variable is not used To: proffesionaladdress2@duck.com, yocto@lists.yoctoproject.org From: "Clayton Casciato" X-Originating-Location: Denver, Colorado, US (174.29.216.122) X-Originating-Platform: Linux Chrome 135 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 08 Apr 2025 06:18:54 -0700 References: In-Reply-To: Message-ID: <6565.1744118334592061080@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="CNyUbcHhyaUwp1DlzeOT" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 08 Apr 2025 13:19:00 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/65122 --CNyUbcHhyaUwp1DlzeOT Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable In case you weren't aware, you can explicitly set default values: W ??=3D "x" A ?=3D "aval" https://docs.yoctoproject.org/bitbake/2.0/bitbake-user-manual/bitbake-user-= manual-metadata.html#setting-a-default-value -- Variables can be queried as to how they are set: $ bitbake-getvar --recipe rpi-u-boot-scr MY_VARIABLE -- Also note: >=20 > The scripts are executed by /bin/sh , which may not be a bash shell but > might be something such as dash. >=20 https://docs.yoctoproject.org/bitbake/2.0/bitbake-user-manual/bitbake-user-= manual-metadata.html#shell-functions --CNyUbcHhyaUwp1DlzeOT Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
In case you weren't aware, you can explicitly set default values:=
W ??=3D "x"
A ?=3D "aval"
 
https://docs.yoctoproject.org/bitbake/2.0/bitbake-user-manual/bitbake-= user-manual-metadata.html#setting-a-default-value
 
--
 
Variables can be queried as to how they are set:
$ bitbake-getvar = --recipe rpi-u-boot-scr MY_VARIABLE
 
--
 
Also note:<= /span>
The = scripts are executed by /bin/sh, which may not be a bash shell but might be something s= uch as dash.=
https://docs.yoctoproject.org/bitbake/2.0/bitbake-user-manual/bitbake-= user-manual-metadata.html#shell-functions
--CNyUbcHhyaUwp1DlzeOT--