From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 26 Dec 2024 08:23:23 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f64.google.com (mail-lf1-f64.google.com [209.85.167.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4BQ7NM1Z013256 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Dec 2024 08:23:22 +0100 Received: by mail-lf1-f64.google.com with SMTP id 2adb3069b0e04-53e1ee761d7sf3387119e87.1 for ; Wed, 25 Dec 2024 23:23:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735197797; cv=pass; d=google.com; s=arc-20240605; b=JTY2Z0unwXEKSmC3o96X8cUUtfLMs7p09eeKIz+m4cp3WhOUZgECMo+vbUYmYHO6Kh c10UF7/VXJUbp94FX30BrwffqxfUK6boWIQLFwnPDQu5QYsdgmXLJzlETnxVhVhOukFz vluq2LAGaNvomoSYbXCBx+cM2YJSUmNPeLbl73YQ5hR/Bsi695SvEW+heBGttCQKt7rI OMEbPsjEHiMxwfVxvJGaEgVlG1ZB4yaF8IR0l4CfQ3Ef1IyglWRnsmuTiwwHOtet7tnZ zgePpWbThMLxzNf2y9V7VZ4GBPgkIl9kmfINZ23h3M0dVpBbKksYQFtBw6T0Xw07YItD 66eQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:user-agent :content-transfer-encoding:autocrypt:references:in-reply-to:date:to :from:subject:message-id:sender:dkim-signature; bh=KXyy/O7qxweByjJzOEu3fCINJyBPD/15ojNLw2hDRZ8=; fh=XTllXDQtjBeTNjIRaR92Uvne6EgKl0h6xTcA4XS9Fxc=; b=bPQvDWUttMqIh6NWPLOCyNxzbxFOtOyGxKoUzlm0XPeS8apqgXBwGxzY2mENlAG8sU ogmetqDCsd4Q9NSAlT+2/nuPH93l8KRungu6xUSu7cfUR7WI1ie/HwGeko7R3xTmDUem PVpdXoBRy/oKTANyHddOhd9hAIUfV8din4nF5whTCoiBsdgcXjIyVi5m0QRJUp7w/Hlf z8cfPeNGZKHRcZ7udR/eCJvJ6QykhTQpwyqRFCdB5np7wXYD8HbJI+0wzp+J9BJR+u2n g1NLuPfw5qjCG2b2Jzr+vZifoJf61PGw9E1T0TBzEKJNtZn11odbNYZKuqsbwEzbwsCm kGRw==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1735197797; x=1735802597; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:user-agent:content-transfer-encoding :autocrypt:references:in-reply-to:date:to:from:subject:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=KXyy/O7qxweByjJzOEu3fCINJyBPD/15ojNLw2hDRZ8=; b=TBxcni/+KomUn0gwavggN9cVxVydzxj09ovONaJDqOTOJmisWiLKy+ladE95AWKduM ECQoVBAaE21Hc31iNFHVFDrsEXy3BZ8heQU5kglBdXGJVcot6ryKDFsoZlEsQmUA1hSJ FMTI1yh1/bCl1Fj5OXlloWFixWKUy7Da5Q1QzuIOe93psWVfUefNRpUMtyaDe9jSExuI g+9gVexPkmAZN5uGDloVssGSI1geF/39GGJbKX6Xz8k0rJyHbFix5nnMQ8//BB0XuhZy VyLLHWMscMavyW2QN9PSxkGPkZS4FK5oXQHefmShyGPToMju721Y8WhtmICkVD+8Fdqz /6oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735197797; x=1735802597; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:to:from:subject:message-id:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=KXyy/O7qxweByjJzOEu3fCINJyBPD/15ojNLw2hDRZ8=; b=rvgOB8cLatv6U+uD3hTXeltEfx+vKfWf1Utf61SB+l5FHAbWCAzw2WgtNnRqlhDK3e ZzbdmMQUtQQOfUGM2XG4KAelQPnK+h8OQ7EGx+p5nev04BtrKTg6ow8oLcNjiOp3pxCO 1FHNZE6Qy7x4fqrqC+4397ELbwQfZ1xw84dcVnxeqWa0EbMEeUoTZDU6Ur2TX3IzMZ0s ycsEZMVIlQ5BKj08yCo6eV17Pb4EcESedrezZd/z57zgm+odMFRdwg4uFgaQ8vdjJp+0 yza+DhFADMFVYEzJo11ulj2N+SETNnBZpwx7d5JhE97x78Wyg2qmUbgfvQ0Tf+s7zdg4 SZcA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUV6GDBmhCzpThPzO4FTcYmZ/Qu+3hieHYcNyXwtl3tCDXaJgtkt3NwiLEp0VWZzDYnS/bW@ilbers.de X-Gm-Message-State: AOJu0Yzks1OtRzjYCuY766NnSC84sT/XPO7P1l91MHJmJQ2v47XC2hyV 2CDJONvl01gS087VsISsgYw93TwK01UNqkwsx7PZjPXC+0z756xD X-Google-Smtp-Source: AGHT+IE5nM+plS8kg6wD1FfNGs4NfzOJvTy5biYKys+bEx2OT/D/L3+oRLd1hQKRNEjndxIlFMaIdQ== X-Received: by 2002:a05:6512:3b99:b0:540:5b5b:4289 with SMTP id 2adb3069b0e04-5422959c788mr6627684e87.47.1735197795830; Wed, 25 Dec 2024 23:23:15 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:239a:b0:540:c34b:91f6 with SMTP id 2adb3069b0e04-54221057b35ls666543e87.1.-pod-prod-05-eu; Wed, 25 Dec 2024 23:23:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU0IF1ovlpkHhvSntIvP139BUBLh3HuZNzHSc5ZhcJw+RQWIFdIe2n1On0ZW0ZTAv5/rFg1EgQK37cY@googlegroups.com X-Received: by 2002:a05:6512:3c8e:b0:541:1c49:26a with SMTP id 2adb3069b0e04-5422958ecd3mr6508819e87.43.1735197793121; Wed, 25 Dec 2024 23:23:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735197793; cv=none; d=google.com; s=arc-20240605; b=GNswESRSPgyGm9XS/Y5yw9ETCPbmzoZgNNZoa4p4Yi332rN6YSI6OjiESrrub1qiGx FjpAS4n3aLasLU7q8UdWar8tqjautwihYmM/IVStqYzVSmohZ5qb0ccLFhydFqcnSrLT LkZs1jGqHXHGAolUjoZu0i5pJjp/XiOu2/pAGOHpJdYnznKJ5qAcVLCJF9ZRx1khlxc6 KA1eMdniw2d3lxs6vKQWcqL+QxvN+M0ssrNZ/G3xlXQxMQQY0J19Po2ec9K2kGNenyds zPPXPbps/dzdVUMQzC9dG7hMbqcyPkWOSk7RLUZzFUwCOqAzHROa8qz+WZedEbrX4KFY PLMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:to:from:subject:message-id; bh=JC68tceko5uKQ8mtRbZl+XfHqyXPxKswxBTD1KavWXg=; fh=jbYBnisNYSJvRlbHg/ujTMhygJ4x63rwn8SYi3Sx8Qw=; b=ZA1+WCxbrRTXwdLI0+fW+QsubhfVLmzeHD/dmV2LCWSECKsy00i3+YIIFRTyUBYFeC gsGyA295LGZpt7NTojPZMPxtEvz5++Io7M80bEtQyiJ6/UanXmAvNZREFAAPMnTI4Rqr MUSCN0JebFtTNWVp/upINiZIOp0jBlWOKo+AL4kcSBHKQyw3a0IiCVi/g3oFdeNOC28W UjXy/22mp6jc5gBbPcb8Qw5DXkiQkE8mGJ1It2ob20EfhocUFWa/1vzNuc5XcHn2rsq6 iJHGKJCEHpDKlucd5h0os/XAx0PLGKTGWqPboYwFYyQ+JCQgcwhGxOvUFPGvDK9lnx6u snbw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 2adb3069b0e04-54223811e71si318067e87.7.2024.12.25.23.23.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Dec 2024 23:23:12 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [IPv6:::1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 4BQ7NAVg013245 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 Dec 2024 08:23:11 +0100 Message-ID: Subject: Re: [PATCHv2] lists.bbclass,bitbake.conf: use features lists From: Uladzimir Bely To: chris.larson@siemens.com, isar-users@googlegroups.com Date: Thu, 26 Dec 2024 10:23:10 +0300 In-Reply-To: <20241223231656.120820-1-chris.larson@siemens.com> References: <20241216201602.619-1-chris.larson@siemens.com> <20241223231656.120820-1-chris.larson@siemens.com> Autocrypt: addr=ubely@ilbers.de; prefer-encrypt=mutual; keydata=mQENBGO2eUkBCACtT+T3OrPVSExBmqfgXT3lp9XcdxRzjYp26wezkgYjjBXaf36bxtaAf S471VoQtpar0RVeFfW7WDDdfX9ZclSj36zBQe+RVSJzoNoNQfjOXWuSHb5Z+cpAFtqBY4muxK4+ia IlLJd6CN3ejOsLHATtCeHHq8wi0z2T+KdLQO+wQRgo2hjj0Lp9pGTrKJry50HP/o7Vbdu14dOx2xq r8+wPc6SQbBIrcqaa4MqCQC00vQG7eXvo+k2MOw59FDdpMH0KR9mHgp3u/s4I+4YRBArukt9G9xz/ rsEFmxAIBC6N/a6Hzwg4puc91n7ABDsPg8Vp+X3MDraujN0dvR6OKVNtABEBAAG0IFVsYWR6aW1pc iBCZWx5IDx1YmVseUBpbGJlcnMuZGU+iQFOBBMBCAA4FiEEJqPNVhVGyk12Eh+PAUQYBM/2FkoFAm O2eUkCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQAUQYBM/2FkprlAgAmuna8Hm9EyoEtTl DBGDg6Zm4ZLp5ffvZBE946h92jepDrteoxsJ7pSzJVC2HmDLa4iZUao7lLLbDsUj5x45/iLJcqBZK k3YnAxP2r6a+kI+1VVQY1pxdG1nlJAbdNzoojm/qmezNPSrqni61KVMQKsXBCWhIjSXDSM9CsBj21 a+9qaVqfxovJGTn9lgrZO+xzKQNMKZeOouJlscVuFj21P0ww3/YENiU/nMeTSuYypO76mDtAd08Jo nc3yuHa9MJGei5ixN3wT+IrGR2aL2hdw2M6NgH7sYbL2Zi4ugD6RXHJai1Bh2yvFSVqSQ+M6QOInT 4ud7wslm1XRB065dXtA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 (by Flathub.org) MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: ubely@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: Jcg+hHzAHJsN On Mon, 2024-12-23 at 16:16 -0700, chris.larson via isar-users wrote: > From: Christopher Larson >=20 >=20 > The intention behind this commit is to ease and encourage the use of > Yocto-style >=20 > features variables, beyond our current usage: >=20 >=20 >=20 > - Add a bbclass to ease the handling of list variables in general >=20 > - Add default values for the features variables >=20 > - Add the features variables to the list variables >=20 > - Add a combined features variable >=20 >=20 >=20 > The intention is that a downstream layer will use `bb.utils.contains` > or >=20 > `bb.utils.contains_any` to enable or disable functionality based on > the presence >=20 > of defined features, rather than adding new variables in each case. >=20 >=20 >=20 > Signed-off-by: Christopher Larson >=20 > --- >=20 > =C2=A0meta/classes/lists.bbclass | 105 > +++++++++++++++++++++++++++++++++++++ >=20 > =C2=A0meta/conf/bitbake.conf=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 19 +++++++ >=20 > =C2=A02 files changed, 124 insertions(+) >=20 > =C2=A0create mode 100644 meta/classes/lists.bbclass >=20 >=20 >=20 > v2 changes: >=20 > - Corrected email address. >=20 > - Added missing LIST_VARIABLES event handler >=20 > - Changed the examples to the more appropriate ROOTFS_FEATURES >=20 >=20 Hello. Could you please resend properly formatted [PATCH v2]? Current one is broken due to multiple extra empty lines and is not recognized as a patch. >=20 > diff --git a/meta/classes/lists.bbclass b/meta/classes/lists.bbclass >=20 > new file mode 100644 >=20 > index 00000000..db8f5837 >=20 > --- /dev/null >=20 > +++ b/meta/classes/lists.bbclass >=20 > @@ -0,0 +1,105 @@ >=20 > +# Functions to improve the functionality of bitbake list variables. >=20 > +# >=20 > +# - Add the ability to remove items from a list variable without > using :remove. >=20 > +# - Add the ability for a list item to imply the addition of other > list items. >=20 > +# >=20 > + >=20 > +# Usage requires either adding the variable name to LIST_VARIABLES, > or manually >=20 > +# adding a :remove and a :prepend to each fully supported list > variable. >=20 > +# >=20 > +# To remove items from a configured list, simply append the item to > be removed >=20 > +# to the variable with a '-' or '~' prefix. For example, to remove > 'alpha' from >=20 > +# ROOTFS_FEATURES, add '-alpha' to ROOTFS_FEATURES. >=20 > +# >=20 > +# To support implied list items, create a mapping of items to be > appended to >=20 > +# the variable when a specific item is present. For example, to > append 'beta' >=20 > +# to ROOTFS_FEATURES when 'alpha' is present, configure > ROOTFS_FEATURES as such, >=20 > +# then set IMPLIED_ROOTFS_FEATURES[alpha] =3D "beta". >=20 > +# >=20 > +# Boilerplate example: >=20 > +# >=20 > +#=C2=A0=C2=A0 # Either this: >=20 > +#=C2=A0=C2=A0 LIST_VARIABLES +=3D "ROOTFS_FEATURES" >=20 > +# >=20 > +#=C2=A0=C2=A0 # Or this: >=20 > +#=C2=A0=C2=A0 ROOTFS_FEATURES:remove =3D > "${@remove_prefixed_items('ROOTFS_FEATURES', d)}" >=20 > +#=C2=A0=C2=A0 ROOTFS_FEATURES:prepend =3D > "${@add_implied_items('ROOTFS_FEATURES', 'IMPLIED_ROOTFS_FEATURES', > d)} " >=20 > +# >=20 > +# Usage example: >=20 > +# >=20 > +#=C2=A0=C2=A0 # ROOTFS_FEATURES will be "beta alpha" if the following > configuration is used: >=20 > +#=C2=A0=C2=A0 IMPLIED_ROOTFS_FEATURES[alpha] =3D "beta" >=20 > +#=C2=A0=C2=A0 ROOTFS_FEATURES +=3D "alpha" >=20 > +# >=20 > +#=C2=A0=C2=A0 # ROOTFS_FEATURES will be "first" if the following configu= ration > is used: >=20 > +#=C2=A0=C2=A0 ROOTFS_FEATURES =3D "first second" >=20 > +#=C2=A0=C2=A0 ROOTFS_FEATURES +=3D "-second" >=20 > + >=20 > +python enable_list_variables() { >=20 > +=C2=A0=C2=A0=C2=A0 """Enable list variable functionality.""" >=20 > +=C2=A0=C2=A0=C2=A0 for variable in d.getVar("LIST_VARIABLES").split(): >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 d.setVar(variable + ':remove'= , ' > ${@remove_prefixed_items("%s", d)}' % variable) >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 d.setVar(variable + ':prepend= ', '${@add_implied_items("%s", > "IMPLIED_%s", d)} ' % (variable, variable)) >=20 > +} >=20 > +enable_list_variables[eventmask] =3D "bb.event.ConfigParsed" >=20 > +addhandler enable_list_variables >=20 > + >=20 > +def remove_prefixed_items(var, d): >=20 > +=C2=A0=C2=A0=C2=A0 """Return the items to be removed from var with :remo= ve. >=20 > + >=20 > +=C2=A0=C2=A0=C2=A0 This function is intended to be used in a :remove han= dler to > remove >=20 > +=C2=A0=C2=A0=C2=A0 items from a variable. It will interpret items prefix= ed with a > '-' >=20 > +=C2=A0=C2=A0=C2=A0 or '~' as items to be removed. >=20 > +=C2=A0=C2=A0=C2=A0 """ >=20 > +=C2=A0=C2=A0=C2=A0 # Use a flag to avoid infinite recursion. >=20 > +=C2=A0=C2=A0=C2=A0 if d.getVarFlag(var, 'remove_prefixed_items_internal'= ) =3D=3D '1': >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return '' >=20 > + >=20 > +=C2=A0=C2=A0=C2=A0 from collections import Counter >=20 > + >=20 > +=C2=A0=C2=A0=C2=A0 d.setVarFlag(var, 'remove_prefixed_items_internal', '= 1') >=20 > +=C2=A0=C2=A0=C2=A0 try: >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 value =3D d.getVar(var) >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 counter =3D Counter() >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for v in value.split(): >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if v.= startswith('-') or v.startswith('~'): >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 counter[v[1:]] -=3D 1 >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 counter[v] -=3D 1 >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else: >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 counter[v] +=3D 1 >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return ' '.join(v for v, c in= counter.items() if c < 1) >=20 > +=C2=A0=C2=A0=C2=A0 finally: >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 d.delVarFlag(var, 'remove_pre= fixed_items_internal') >=20 > + >=20 > + >=20 > +def add_implied_items(var, implied_var, d): >=20 > +=C2=A0=C2=A0=C2=A0 """Return the items to be appended due to the presenc= e of other > items in var. >=20 > + >=20 > +=C2=A0=C2=A0=C2=A0 This function is intended to be used in a :append han= dler to > append >=20 > +=C2=A0=C2=A0=C2=A0 items from a variable. It will rely on the supplied m= apping of > implied items >=20 > +=C2=A0=C2=A0=C2=A0 to append the corresponding items. >=20 > +=C2=A0=C2=A0=C2=A0 """ >=20 > +=C2=A0=C2=A0=C2=A0 # Use a flag to avoid infinite recursion. >=20 > +=C2=A0=C2=A0=C2=A0 if d.getVarFlag(var, 'add_implied_items_internal') = =3D=3D '1': >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return '' >=20 > + >=20 > +=C2=A0=C2=A0=C2=A0 def implied_items(item, implied_mapping, d, seen=3DNo= ne): >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """Return the implied items f= or a given item.""" >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if seen is None: >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 seen = =3D set() >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if item in seen: >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 retur= n '' >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 seen.add(item) >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 implied =3D implied_mapping.g= et(item, '').split() >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return ' '.join(implied + [im= plied_items(f, implied_mapping, > d, seen) for f in implied]) >=20 > + >=20 > +=C2=A0=C2=A0=C2=A0 d.setVarFlag(var, 'add_implied_items_internal', '1') >=20 > +=C2=A0=C2=A0=C2=A0 try: >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 value =3D d.getVar(var) >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 implied_mapping =3D d.getVarF= lags(implied_var) >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if implied_mapping is None: >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 retur= n '' >=20 > + >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return ' '.join(implied_items= (f, implied_mapping, d) for f > in value.split()) >=20 > +=C2=A0=C2=A0=C2=A0 finally: >=20 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 d.delVarFlag(var, 'add_implie= d_items_internal') >=20 > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf >=20 > index cda98035..9f3b8a4e 100644 >=20 > --- a/meta/conf/bitbake.conf >=20 > +++ b/meta/conf/bitbake.conf >=20 > @@ -172,6 +172,25 @@ BBINCLUDELOGS ??=3D "yes" >=20 > =C2=A0# Add event handlers for bitbake >=20 > =C2=A0INHERIT +=3D "isar-events sstate" >=20 > =C2=A0 >=20 > +# Make features variables available >=20 > +INHERIT +=3D "lists" >=20 > + >=20 > +LIST_VARIABLES +=3D "BASE_REPO_FEATURES MACHINE_FEATURES > DISTRO_FEATURES ROOTFS_FEATURES" >=20 > + >=20 > +BASE_REPO_FEATURES ??=3D "" >=20 > +BASE_REPO_FEATURES[doc] =3D "Specifies the list of features for the > base-apt repository." >=20 > + >=20 > +MACHINE_FEATURES ??=3D "" >=20 > +MACHINE_FEATURES[doc] =3D "Specifies the list of hardware features the > MACHINE is capable of supporting." >=20 > + >=20 > +DISTRO_FEATURES ??=3D "" >=20 > +DISTRO_FEATURES[doc] =3D "The software support you want in your > distribution for various features." >=20 > + >=20 > +COMBINED_FEATURES =3D "${@oe.utils.set_intersect('DISTRO_FEATURES', > 'MACHINE_FEATURES', d)}" >=20 > + >=20 > +ROOTFS_FEATURES ??=3D "" >=20 > +ROOTFS_FEATURES[doc] =3D "The list of features to be included in a > root filesystem. Typically, you configure this variable in an image > recipe or class." >=20 > + >=20 > =C2=A0# Buildstats requires IMAGE_ROOTFS to be always defined >=20 > =C2=A0IMAGE_ROOTFS ??=3D "${WORKDIR}/rootfs" >=20 > =C2=A0INHERIT +=3D "${@'buildstats' if > bb.utils.to_boolean(d.getVar('USE_BUILDSTATS')) else ''}" >=20 > --=20 >=20 > 2.47.1 >=20 >=20 >=20 --=20 Best regards, Uladzimir. --=20 You received this message because you are subscribed to the Google Groups "= isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/= ae7bf3c853e86fc6412d7beba960cf41dbabdd02.camel%40ilbers.de.