All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Eggers <ceggers@arri.de>
To: <bitbake-devel@lists.openembedded.org>,
	Christopher Larson <kergoth@gmail.com>
Subject: Re: [bitbake-devel] conditional inheriting classes does not work with bbappends
Date: Fri, 8 Apr 2022 18:54:15 +0200	[thread overview]
Message-ID: <3188702.aeNJFYEL58@localhost.localdomain> (raw)
In-Reply-To: <9b705184-11b1-48fa-98b5-814a754b1b5b@Spark>


[-- Attachment #1.1: Type: text/plain, Size: 2668 bytes --]

On Thursday, 7 April 2022, 23:59:39 CEST, Christopher Larson wrote:
> There’s no way to avoid that, inherit lines are evaluated *at the moment of inherit* on that line, they aren’t postponed.

ok, this is what I would expect. So how to handle this:

- do not conditionally inherit in PACKAGECONFIG (may be impossible)?
- do not set PACKAGECONFIG in bbappend files (use distro/machine/layer/local config for this)?

regards
Christian


>
> --
> Christopher Larson
> chris_larson@mentor.com, chris.larson@siemens.com, kergoth@gmail.com
> Principal Software Engineer, Embedded Linux Solutions, Siemens Digital Industries Software

_______________________________________________________
Christian
Eggers
Software Engineer
​
ARRI
Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Arriweg 17,
83071
Stephanskirchen
www.arri.com

+49 8036 3009-3118
CEggers@arri.de

​
Get all the latest information from www.arri.com, Facebook, Twitter, Instagram, LinkedIn and YouTube.

Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRA 57918
Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRB 54477
Geschäftsführer: Dr. Matthias Erb (Chairman); Dr. Michael Neuhäuser; Stephan Schenk; Walter Trauninger

​
> On Apr 7, 2022, 7:17 AM -0700, Christian Eggers <ceggers@arri.de>, wrote:
> > Example: meta-openembedded/meta-networking/recipes-support/chrony/chrony_4.2.bb
> >
> > --------------------------------8<--------------------------------
> > # Add chronyd user if privdrop packageconfig is selected
> > inherit ${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 'useradd', '', d)}
> > USERADD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '${PN}', '', d)}"
> > USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '--system -d / -M --shell /bin/nologin chronyd;', '', d)}"
> >
> > ...
> >
> > PACKAGECONFIG ??= ...
> > -------------------------------->8--------------------------------
> >
> >
> > Problem #1: useradd is not inherited because PACKAGECONFIG is set below the conditional "inherit"
> > statement. Even when I add "privdrop" to PACKAGECONFIG here, useradd.bbclass is not inherited. I
> > must move the PACKAGECONFIG line above the inherit statement to make this work.
> >
> > Problem #2: Due to problem #1, useradd.bbclass is also not inherited when I add "privdrop" to
> > PACKAGECONFIG in bbappend file (in a custom layer).
> >
> > regards
> > Christian




[-- Attachment #1.2: Type: text/html, Size: 11959 bytes --]

[-- Attachment #2: image232494.png --]
[-- Type: image/png, Size: 528 bytes --]

[-- Attachment #3: image127421.png --]
[-- Type: image/png, Size: 824 bytes --]

  reply	other threads:[~2022-04-08 17:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 14:17 conditional inheriting classes does not work with bbappends Christian Eggers
2022-04-07 21:59 ` [bitbake-devel] " Christopher Larson
2022-04-08 16:54   ` Christian Eggers [this message]
2022-04-12 14:12     ` Peter Kjellerstedt
2022-04-13  6:03       ` Christian Eggers
2022-04-13 10:24   ` Jose Quaresma
2022-04-13 10:35     ` Peter Kjellerstedt
2022-04-13 16:33       ` Diego Santa Cruz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3188702.aeNJFYEL58@localhost.localdomain \
    --to=ceggers@arri.de \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=kergoth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.