From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.36033.1796055627220956849 for ; Mon, 30 Nov 2026 08:20:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=CRLhfMMV; spf=pass (domain: bootlin.com, ip: 185.171.202.116, mailfrom: antonin.godard@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id A422AC2AC71 for ; Mon, 30 Nov 2026 16:20:34 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 74DA16007C; Mon, 30 Nov 2026 16:20:24 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4F72311EA03E0; Mon, 30 Nov 2026 17:20:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796055624; h=from:subject:date:message-id:to:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=iUl7TJykpeAsp8Sg1Kk9osC2wNLfUK4PdOT0bY2LipE=; b=CRLhfMMVByBi0iTHZ8Z5WvlV3w3Db5zhd9wzCYGwnQZyf0Dp7RlNlHOxM7OxT7SSTsm+aa PAPSpAygB6HyFQmo4ClhftSxuHD9T+eTG23fCQidiMw7QAimQH9krWM1y9mAkCToYE6rLa OAEUTh46TbHwa08zl+KuRJO9h8bZdiF1CF/lxJj4hKdyfEt7cYYLChn9cZsVFd5JrG9O0w RsfOn+Z023iHpekmIsdH/aEGpG07GTZGQIk4kgQK57nbnxcjV+I34skcUZMK7VOroyK/uK d5Gbgn1sMdTG9gIWY+7noOITcJqaJDa68SBvQvJy7DMwbSs2lfx/srpTZn9SJg== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 30 Nov 2026 17:20:22 +0100 Message-Id: From: "Antonin Godard" To: , Subject: Re: [bitbake-devel] [PATCH 06/17] cooker: Change layer.conf handling to new approach References: <20261130152847.3472849-1-richard.purdie@linuxfoundation.org> <20261130152847.3472849-6-richard.purdie@linuxfoundation.org> In-Reply-To: <20261130152847.3472849-6-richard.purdie@linuxfoundation.org> X-Last-TLS-Session-Version: TLSv1.3 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 ; Mon, 30 Nov 2026 16:20:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/20507 Hi, On Mon Nov 30, 2026 at 4:28 PM CET, Richard Purdie via bitbake-devel wrote: [...] > --- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst > +++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst > @@ -922,48 +922,6 @@ overview of their function and contents. > You must set this variable in the external environment in order > for it to work. > =20 > - :term:`BBFILE_COLLECTIONS` > - Lists the names of configured layers. These names are used to find > - the other ``BBFILE_*`` variables. Typically, each layer appends it= s > - name to this variable in its ``conf/layer.conf`` file. > - > - :term:`BBFILE_PATTERN` > - Variable that expands to match files from > - :term:`BBFILES` in a particular layer. This > - variable is used in the ``conf/layer.conf`` file and must be suffi= xed > - with the name of the specific layer (e.g. > - ``BBFILE_PATTERN_emenlow``). > - > - :term:`BBFILE_PRIORITY` > - Assigns the priority for recipe files in each layer. > - > - This variable is used in the ``conf/layer.conf`` file and must be > - suffixed with a `_` followed by the name of the specific layer (e.= g. > - ``BBFILE_PRIORITY_emenlow``). Colon as separator is not supported. > - > - This variable is useful in situations where the same recipe appear= s > - in more than one layer. Setting this variable allows you to > - prioritize a layer against other layers that contain the same reci= pe > - --- effectively letting you control the precedence for the multipl= e > - layers. The precedence established through this variable stands > - regardless of a recipe's version (:term:`PV` variable). > - For example, a layer that has a recipe with a higher :term:`PV` va= lue but > - for which the :term:`BBFILE_PRIORITY` is set to have a lower prece= dence > - still has a lower precedence. > - > - A larger value for the :term:`BBFILE_PRIORITY` variable results in= a > - higher precedence. For example, the value 6 has a higher precedenc= e > - than the value 5. If not specified, the :term:`BBFILE_PRIORITY` va= riable > - is set based on layer dependencies (see the :term:`LAYERDEPENDS` v= ariable > - for more information). The default priority, if unspecified for a > - layer with no dependencies, is the lowest defined priority + 1 (or= 1 > - if no priorities are defined). > - > - .. tip:: > - > - You can use the command bitbake-layers show-layers to list all > - configured layers along with their priorities. > - > :term:`BBFILES` > A space-separated list of recipe files BitBake uses to build > software. > @@ -1198,6 +1156,9 @@ overview of their function and contents. > Allows you to use a configuration file to add to the list of > command-line target recipes you want to build. > =20 > + :term:`BITBAKEDIR` > + BitBake sets this to location where bitbake is being run from. > + > :term:`BITBAKE_UI` > Used to specify the UI module to use when running BitBake. Using t= his > variable is equivalent to using the ``-u`` command-line option. > @@ -1375,12 +1336,13 @@ overview of their function and contents. > available outside of ``layer.conf`` and references are expanded > immediately when parsing of the file completes. > =20 > - :term:`LAYERDIR_RE` > + :term:`LAYERDIR_` We usually don't have terms with placeholder values. I'd suggest defining i= t only as LAYERDIR: :term:`LAYERDIR` This variable is automatically defined by :term:`BitBake` when parsing t= he layers: when :term:`BitBake` reads the :term:`BBLAYERS` variable, it set= s a new ``LAYERDIR_`` variable containing the absolute layer p= ath for each layer in the list. The ```` value is determined fro= m the layer's :term:`LAYERNAME`. Note that I have a follow-up patch for the currently undocumented LAYER* variables. [...] > + if var in initial: > + orig =3D initial.getVar(var, False) > + new =3D ld.getVar(var, False) > + if orig =3D=3D new: > + continue > + if not new.startswith(orig): > + errors.append("Layer %s is overwriting varia= ble %s, it should only append to it" % (layer, var)) > + continue > + append =3D new.removeprefix(orig) > + if var.startswith(layer_safevars): > + pass > + elif var.startswith(("BBLAYERS_LAYERINDEX_NAME", "BB= _GLOBAL_PYMODULES")): > + pass > + else: > + bb.warn("Variable %s is set by %s but it will be= ignored" % (var, layer)) I'd suggest printing a more useful warning message, something along: bb.warn(f"Variable {var} is set in {layer}/conf/layer.conf and will be ign= ored. " "Only variables part of LAYER_PASSTHROUGH_VARS_PREFIXES are allowe= d " "to be set from the layer.conf file.") Antonin