why would you even use "FILESEXTRAPATHS:append ..."?
a followup to my earlier post pointing out improper usage with that
feature ... i'm still unclear as to why one would *append* to FILESEXTRAPATHS. it seems like that might be something worth explaining when that section comes up.
rday
Hi Robert,
Quoted 6 lines · Robert P. J. Day via lists.yoctoproject.org
a followup to my earlier post pointing out improper usage with that
feature ... i'm still unclear as to why one would *append* to FILESEXTRAPATHS. it seems like that might be something worth explaining when that section comes up.
The only reason I can think of at the moment is for a smooth transition period.
E.g. I absolutely need a file to be in SRC_URI so I'll have my bbappend add its path to FILESEXTRAPATHS (so far nothing different from a typical setup).
But, I want to upstream this so I don't have to carry it forever. My patch eventually gets merged into e.g. OE-Core and it has the file in SRC_URI.
If I were to use :prepend in my bbappend, my file would always take precedence even if there are patches made to the file in OE-Core.
Instead, I could use an :append in which case whenever OE-Core has the file in SRC_URI, it'll use that one instead of the one from my bbappend.
Now I can forget about it because it won't be used the moment OE-Core has the patch merged.
This is actually quite useful if you have a layer that works with a release, say scarthgap. I patch in my layer until my patch gets merged into master and then backported to scarthgap, that may take a few months before a scarthgap release carries my patch. How do I make sure my layer is compatible with release 4 of scarthgap without the patch and release 8 with my patch, but still benefit from changes to the same file in e.g. release 15 of scarthgap?
I think there could be a usecase for a bbappend for multiple versions of the same recipe but I cannot articulate it now, so maybe that is just something my mind is trying to make up.
In short, I think it's more often a mistake than something intended. We have had the same kind of issue with the wrong operator (or line order) used with MACHINEOVERRIDES where its order got all messed up (admittedly years ago :) ).
Cheers,
Quentin
Quoted 35 lines · Quentin Schulz
Hi Robert,
Quoted 6 lines · Robert P. J. Day via lists.yoctoproject.org
a followup to my earlier post pointing out improper usage with that
feature ... i'm still unclear as to why one would *append* to FILESEXTRAPATHS. it seems like that might be something worth explaining when that section comes up.The only reason I can think of at the moment is for a smooth transition period.
E.g. I absolutely need a file to be in
SRC_URIso I'll have my bbappend add its path to FILESEXTRAPATHS (so far nothing different from a typical setup).But, I want to upstream this so I don't have to carry it forever. My patch eventually gets merged into e.g. OE-Core and it has the file in
SRC_URI.If I were to use :prepend in my bbappend, my file would always take precedence even if there are patches made to the file in OE-Core.
Instead, I could use an :append in which case whenever OE-Core has the file in
SRC_URI, it'll use that one instead of the one from my bbappend.Now I can forget about it because it won't be used the moment OE-Core has the patch merged.
This is actually quite useful if you have a layer that works with a release, say scarthgap. I patch in my layer until my patch gets merged into master and then backported to scarthgap, that may take a few months before a scarthgap release carries my patch. How do I make sure my layer is compatible with release 4 of scarthgap without the patch and release 8 with my patch, but still benefit from changes to the same file in e.g. release 15 of scarthgap?
Quoted 7 lines
I think there could be a usecase for a bbappend for multiple versions of the same recipe but I cannot articulate it now, so maybe that is just something my mind is trying to make up.
In short, I think it's more often a mistake than something intended. We have had the same kind of issue with the wrong operator (or line order) used with MACHINEOVERRIDES where its order got all messed up (admittedly years ago :) ).
interesting ... it occurs that while it might not be worth this
corner case explanation to the docs, it might be worth adding a note to this section:
https://docs.yoctoproject.org/ref-manual/variables.html#term-FILESEXTRAPATHS
advising that "prepend" is almost always what you want, and while it's possible to "append", that is more than likely a mistake, and should be done only by developers who understand the difference.
or something like that.
rday