* Depending on other package's config
@ 2021-11-05 22:24 Maxim Sloyko
2021-11-06 0:48 ` [OE-core] " Andre McCurdy
0 siblings, 1 reply; 2+ messages in thread
From: Maxim Sloyko @ 2021-11-05 22:24 UTC (permalink / raw)
To: openembedded-core
Hi all,
Posting this to openembedded-core, as it was suggested to me.
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".
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [OE-core] Depending on other package's config
2021-11-05 22:24 Depending on other package's config Maxim Sloyko
@ 2021-11-06 0:48 ` Andre McCurdy
0 siblings, 0 replies; 2+ messages in thread
From: Andre McCurdy @ 2021-11-06 0:48 UTC (permalink / raw)
To: maxims; +Cc: OE Core mailing list
On Fri, Nov 5, 2021 at 3:25 PM Maxim Sloyko via lists.openembedded.org
<maxims=google.com@lists.openembedded.org> wrote:
>
> Hi all,
>
> Posting this to openembedded-core, as it was suggested to me.
>
> 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".
You're doing that just to generate a build time error if the two
recipe's configurations are not consistent?
The normal approach would be to define a global variable (e.g. a
distro feature) which both recipes can check and use to configure
themselves appropriately.
> 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
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#157929): https://lists.openembedded.org/g/openembedded-core/message/157929
> Mute This Topic: https://lists.openembedded.org/mt/86853514/3619030
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [armccurdy@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-06 0:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 22:24 Depending on other package's config Maxim Sloyko
2021-11-06 0:48 ` [OE-core] " Andre McCurdy
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.