why i'm not crazy about "PROVIDES += ..." syntax, then i'll shut up
yes, i appreciate the recent settling on the preferred syntax of
"PROVIDES +=" rather than "PROVIDES =", so i'll whine about why i don't like it one more time, then i'll shut up about it (and there's a larger point to be made here as well).
we all know that it is necessary to use only "PROVIDES =" to *add*
extra provided entities, but the current bitbake manual makes no mention of that explicitly; it simply shows an example of:
PROVIDES += "fullkeyboard"
sure, that will work, and it might even make readers feel better, but here's the problem.
many readers like me, in order to better understand things they read
for the first time, will instantly go look in the source code for examples as to how those things are used. i used to do that all the time, which is why i kept stumbling over things that seemed to disagree with what i just read, and i'd ask about it and, in many cases, the reaction was, "huh ... you're right, that's kind of confusing, we should clean that up."
the same thing is going to happen here, as some readers will read
that section in the BB manual, run a quick "grep", and run into, for example:
systemd/systemd_247.3.bb:PROVIDES = "udev"
udev/eudev_3.2.10.bb:PROVIDES = "udev"
and some of them will fer shure get confused about why it's "=" instead of "+=".
IMHO, it's fine to settle on a preferred style, but not if you
deliberately omit the other possibilities. protecting the reader from subtleties or complexities is not helping them if it simply sets them up to be confused later. after all, if one regularly advises people to both RTFM and RTFS, then those two things should not appear to contradict each other.
i will shut up now.
rday
Hi Robert,
Quoted 33 lines · Robert P. J. Day
yes, i appreciate the recent settling on the preferred syntax of
"PROVIDES +=" rather than "PROVIDES =", so i'll whine about why i don't like it one more time, then i'll shut up about it (and there's a larger point to be made here as well).we all know that it is necessary to use only "PROVIDES =" to *add*
extra provided entities, but the current bitbake manual makes no mention of that explicitly; it simply shows an example of:PROVIDES += "fullkeyboard"
sure, that will work, and it might even make readers feel better, but here's the problem.
many readers like me, in order to better understand things they read
for the first time, will instantly go look in the source code for examples as to how those things are used. i used to do that all the time, which is why i kept stumbling over things that seemed to disagree with what i just read, and i'd ask about it and, in many cases, the reaction was, "huh ... you're right, that's kind of confusing, we should clean that up."the same thing is going to happen here, as some readers will read
that section in the BB manual, run a quick "grep", and run into, for example:systemd/systemd_247.3.bb:PROVIDES = "udev"
udev/eudev_3.2.10.bb:PROVIDES = "udev"and some of them will fer shure get confused about why it's "=" instead of "+=".
Quoted 9 lines
IMHO, it's fine to settle on a preferred style, but not if you
deliberately omit the other possibilities. protecting the reader from subtleties or complexities is not helping them if it simply sets them up to be confused later. after all, if one regularly advises people to both RTFM and RTFS, then those two things should not appear to contradict each other.i will shut up now.
https://docs.yoctoproject.org/ref-manual/variables.html#term-PROVIDES
``` Note A recipe’s own recipe name (PN) is always implicitly prepended to PROVIDES, so while using “+=” in the above example may not be strictly necessary it is recommended to avoid confusion. ```
Seems explicit enough to me. What would you suggest to improve the explanation of PROVIDES?
Cheers,
Quentin