Re: New assignment operator?

Richard Purdie

On Tue, 2021-06-15 at 11:42 +0000, Quentin Schulz wrote:

On June 15, 2021 10:29:01 AM UTC, Richard Purdie <richard.purdie@...> wrote:
We have an interesting problem with initramfs images. They do something like:


which looks innocent enough until a BSP does:

IMAGE_FSTYPES_collie = "xxx"

where collie is MACHINE, hence an override which causes confusion as 
the value of INITRAMFS_FSTYPES is never used for that machine.
Is that an issue that needs to actually be fixed? This is just another example 
of weird BSP given by vendors to me, right?
Well, it seems like an ok thing for a BSP to do to me. There are probably 
other ways it could be done, sure.

Resetting IMAGE_FSTYPES_collie to INITRAMFS_FSTYPES should be enough 
to fix this issue right?
No, I don't see how that helps.

The questions are 
 a) is another assignment operator a good idea?
I'm not sure the issue explained in this mail is enough to warrant a new 
assignment operator.
The issue in the email is an example of a general problem where it is 
effectively impossible to undo certain operations. That general issue bothers
me more than this specific case.

We can argue the BSP is broken. The BSP is arguing bitbake is broken.
Failing that, there is an argument the initramfs recipes are broken. I
can see the different sides but there is a general problem here we've
pondered over for a while.

I can already see vendors abusing this by always using this new operator 
instead of using overrides or whatever.
We could ban the operator from conf files (enforced)?

This would be even less fun to support on IRC or mailing lists.
Maybe, maybe not. It depends how it gets used and if "abuse" occurs.

Also... As opposed to other operators, what would happen if you use the 
following: IMAGE_FSTYPES_collir *:= "whatever". What would be the meaning 
and behavior, it might warrant a different handling compared to other 
operators to forbid any override (and append, prepend, remove).
Thankfully that is quite clear and would clear any overrides set against

 b) if so, which form?
Totally unbiased. The last two 😁
It highlights that like := it is an immediate assignment operator. 
The asterisk indicates that it will apply to "everything".
Except that half the behaviour of := doesn't apply (the expansion). :=
is immediate expansion *and* immediate assignment.



Join to automatically receive all group messages.