couple more observations about bbappend and BBMASKing
i'll throw this out there as possible enhancements to the docs as
i've run across this on an occasional basis.
consider, say, an OE recipe "fubar" that, among other things,
defines SRC_URI to include a couple standard files that it installs in the normal places:
SRC_URI = "... \ fubar.service \ fubar.conf \ ... "
first observation is that it is, of course, reasonable to define a
file "fubar_%.bbappend" file to override those two files but, on occasion, i've seen a bbappend file of the form
fubar_%.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "fubar.conf fubar.service" do_install_append() {
... whatever ...}
it is, of course, unnecessary to append those two files to SRC_URI as they are *already* part of SRC_URI from the original recipe, but it is surprising how many people i've run into who don't know that, and assume they *always* need to append to SRC_URI whatever files they're supplying with their bbappend processing. (doesn't hurt, of course, but it does demonstrate a misunderstanding of how SRC_URI works.)
also, with respect to BBMASKing, i have on occasion seen someone
who, when starting a project, decides they don't need the do_install_append() from fubar.bbappend but *do* still want the custom files, and proceed to BBMASK that fubar.bbappend file, not realizing that by BBMASKing the bbappend file, they're taking out the FILESEXTRAPATHS... line, thereby de-activating the custom files and reverting to the original ones.
thoughts? is any of the above worth adding a bit more about?
rday
hey Robert,
Quoted 27 lines · Robert P. J. Day
i'll throw this out there as possible enhancements to the docs as
i've run across this on an occasional basis.consider, say, an OE recipe "fubar" that, among other things,
definesSRC_URIto include a couple standard files that it installs in the normal places:SRC_URI = "... \ fubar.service \ fubar.conf \ ... "first observation is that it is, of course, reasonable to define a
file "fubar_%.bbappend" file to override those two files but, on occasion, i've seen a bbappend file of the formfubar_%.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI += "fubar.conf fubar.service" do_install_append() { ... whatever ... }
Quoted 6 lines
it is, of course, unnecessary to append those two files to
SRC_URIas they are *already* part ofSRC_URIfrom the original recipe, but it is surprising how many people i've run into who don't know that, and assume they *always* need to append toSRC_URIwhatever files they're supplying with their bbappend processing. (doesn't hurt, of course, but it does demonstrate a misunderstanding of howSRC_URIworks.)
I would rather say it's a misunderstanding of how bbappend works in this specific case.
Looking at the documentation we have today I think it's already 'clear' and explains well what a bbappend does, We even has an example that is exactly what you have above. So I am not sure how it can be better, see:
https://docs.yoctoproject.org/dev-manual/dev-manual-common-tasks.html#using-bbappend-files-in-your-layer
If you can find a better wording, or perhaps another example to insist, feel free to send a patch!
Quoted 10 lines
also, with respect to BBMASKing, i have on occasion seen someone
who, when starting a project, decides they don't need thedo_install_append()from fubar.bbappend but *do* still want the custom files, and proceed to BBMASK that fubar.bbappend file, not realizing that by BBMASKing the bbappend file, they're taking out the FILESEXTRAPATHS... line, thereby de-activating the custom files and reverting to the original ones.thoughts? is any of the above worth adding a bit more about?
Here again, checking the manual:
https://docs.yoctoproject.org/ref-manual/ref-variables.html?highlight=bbmask#term-BBMASK
We have "Prevents BitBake from processing recipes and recipe append files."
Quoted 6 lines
rday