All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: "maxims@google.com" <maxims@google.com>,
	openembedded-devel <openembedded-devel@lists.openembedded.org>
Subject: RE: [oe] Depending on other package's features.
Date: Fri, 5 Nov 2021 16:33:11 +0000	[thread overview]
Message-ID: <654beb1c1d7d449e8d6f85e427b8f2eb@axis.com> (raw)
In-Reply-To: <CAFR_W8rkzPWCN9BnHXjZTcu58sBYfGOsOAT-rUyUKB1_k59X4w@mail.gmail.com>

> -----Original Message-----
> From: openembedded-devel@lists.openembedded.org <openembedded-
> devel@lists.openembedded.org> On Behalf Of Maxim Sloyko via
> lists.openembedded.org
> Sent: den 4 november 2021 22:46
> To: openembedded-devel <openembedded-devel@lists.openembedded.org>
> Subject: [oe] Depending on other package's features.

This type of questions belong on the 
openembedded-core@lists.openembedded.org mailing list.

> 
> Hi all,
> 
> The recipe that I'm working on for our system (let's call it A) has a
> dependency on a certain feature being enabled in another package (B).
> So, in B, we have:
> 
> PACKAGECONFIG[nice-feature] = "..."
> 
> and my recipe (or rather, the tool built by the recipe), needs that
> feature to be enabled to work properly. What's worse, is that this is
> a runtime dependency, so if somebody just forgets to enable that
> feature, the image will build fine, but the tool won't work. I would
> like this to be a build time failure.
> 
> My plan is to change recipe A, so that if the "nice-feature" is
> enabled, the package will PROVIDE one more thing:
> 
> PROVIDES += "${PN}-nice-feature"
> 
> and in my recipe B, I'll declare this as a dependency:
> 
> RDEPENDS:${PN} += "package-a-nice-feature".

PROVIDES is for build time provides of recipes. You cannot mix it 
with RDEPENDS:${PN} which is for runtime dependencies for packages.

> Now I'm thinking, wouldn't it be great if package A could specify
> extra PROVIDES when the feature is configured? This would be similar
> to the way it's done for package's R?DEPENDS:
> 
>      PACKAGECONFIG ??= "f1 f2 f3 ..."
>      PACKAGECONFIG[f1] = "\
>                           --with-f1, \
>                           --without-f1, \
>                           build-deps-for-f1, \
>                           runtime-deps-for-f1, \
>                           runtime-recommends-for-f1, \
>                           packageconfig-conflicts-for-f1 \
>                           provides-for-f1 \
>                           "
> 
> The last line would be a change that I propose. It looks like it would
> be relatively easy to implement this in base.bbclass
> 
> What do you think? Will this be useful? Did I miss an existing way to do
> this?
> 
> Thanks,
> 
> --
> -MS

//Peter


  reply	other threads:[~2021-11-05 16:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 21:45 Depending on other package's features Maxim Sloyko
2021-11-05 16:33 ` Peter Kjellerstedt [this message]
2021-11-06 15:42   ` [oe] " Philip Balister

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=654beb1c1d7d449e8d6f85e427b8f2eb@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=maxims@google.com \
    --cc=openembedded-devel@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 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.