On 8/12/21 1:02 pm, Richard Purdie wrote:
On Tue, 2021-12-07 at 11:09 -0800, Andre McCurdy wrote:
On Tue, Dec 7, 2021 at 9:58 AM Richard Purdie <[email protected]> wrote:
On Tue, 2021-12-07 at 17:53 +0000, Ross Burton wrote:
On Tue, 7 Dec 2021 at 17:15, Konrad Weihmann <[email protected]> wrote:
TBF

the correct fix would be

magic.bbclass
---
DEPENDS:append = " magic-dependency"
---

but unfortunately sometimes this is out of our control (as we don't want
to have bbclassappends for totally valid reasons)

Thoughts?
Personally, I'd say that's the correct fix, and any class that
DEPENDS= is just broken. Recipes should be able to do DEPENDS= because
that's convenient, and classes should use DEPENDS:append.
This is complicated by the issue that such appends are near impossible to
override, so you end up with the conditional bits in autotools/base.bbclass
adding variables to set to stop the behaviour. Classes should be a starting
point for things, not a hard requirement the recipe can't override.
If the goal is to let the recipe undo changes made by a .bbclass then
one easy solution is indirection. The class can use:

MAGIC_DEPENDS ?= "foo"
DEPENDS:append = " ${MAGIC_DEPENDS}"

Recipes can then override MAGIC_DEPENDS as required.
That does still feel like we're admitting our syntax is broken though :(


I'd vote for this option.

I don't see it as an admission of failure at all, on the contrary it says, "Default behaviour is to append this, but we've given you a setting that you can manipulate if you need to."

FWIW, we also have quite a few :remove(s) in our proprietary layer, mostly in .bbappend files.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#1380): 
https://lists.openembedded.org/g/openembedded-architecture/message/1380
Mute This Topic: https://lists.openembedded.org/mt/87569589/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-architecture/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to