public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Robert Joslyn" <robert.joslyn@redrectangle.org>
To: openembedded-core@lists.openembedded.org
Subject: Conditional inherit with PACKAGECONFIG
Date: Thu, 03 Dec 2020 20:34:58 -0800	[thread overview]
Message-ID: <aebe57d858d895a9266a9a25e90b60c8a34dd9e3.camel@redrectangle.org> (raw)

I'm trying to remove unnecessary packages from one of my images, and I
noticed that some conditional inherit lines don't work as I'd expect. In
my case, I'm trying to remove python, and the only recipe pulling in
python is btrfs-tools. The relevant parts of the btrfs-tools recipe (I'm
building on master):

PACKAGECONFIG ??= "python"

PACKAGECONFIG[python] = "--enable-python,--disable-python,python3-
setuptools-native"

inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'distutils3-base', 
'', d)}

I have a bbappend removing the default PACKAGECONFIG containing "python",
but I still get a btrfs-tools package that RDEPENDS on python because the
distutils3-base class is still inherited. If I modify the btrfs-tools
recipe directly to be:

PACKAGECONFIG ??= ""

then I don't get python as an RDEPENDS. If I have the recipe modified like
this and then try to add python to PACKAGECONFIG from my bbappend, the
recipe fails to build because distutils3-base isn't inherited.

My guess is that the inherit lines are parsed and expanded before the
bbappend modification to PACKAGECONFIG are applied. The bitbake
documentation says you can have conditional inherits similar to this, but
it seems there is more nuance with how the parsing is done. How should
this be done if I want to be able to remove python from this recipe using
a bbappend? I'd prefer to avoid copying the recipe into my layer to make
the changes.

Thanks,
Robert


             reply	other threads:[~2020-12-04  4:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  4:34 Robert Joslyn [this message]
2020-12-04 11:40 ` [OE-core] Conditional inherit with PACKAGECONFIG Konrad Weihmann
2020-12-08  4:26   ` Robert Joslyn

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=aebe57d858d895a9266a9a25e90b60c8a34dd9e3.camel@redrectangle.org \
    --to=robert.joslyn@redrectangle.org \
    --cc=openembedded-core@lists.openembedded.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox