I'll try. Both of these variable define recipe dependencies.
-RDEPENDS_${PN} = "kernel-module-tun"
RDEPENDS is a hard, runtime dependency. So anything listed extends the functionality to which it applies but MUST be installed for the package to run correctly. If a listed package is not present, or not yet built, the dependent package is still able to build successfully. The YoctoProject Reference Manual includes a nice description of this variable. Please see Reference Manual
+RRECOMMENDS_${PN} = "kernel-module-tun"
RRECOMMENDS is a soft, runtime dependency. So anything listed extends the functionality to which it applies, but is not a requirement for building. There are a few more quirks about RRECOMMENDS that you may wish to look up in the YoctoProject Reference Manual, which seems to be the best resource for this type of material at this time: Reference Manual
So to answer your question, RRECOMMENDS
will install kernel-module-tun
if it is available. If it is not, the build will continue. The opposite would be using the RDEPENDS
statement, which, if kernel-module-tun
could not be found, would cause an error during the build process.