Geontech / meta-redhawk-sdr

REDHAWK SDR Layer for Yocto/OpenEmbedded -based deployments
http://geontech.com/getting-started-with-meta-redhawk-sdr/
GNU Lesser General Public License v3.0
9 stars 6 forks source link

Remove dynamic patch functions from do_patch #64

Open btgoodwin opened 3 years ago

btgoodwin commented 3 years ago

As a general statement, tasks should be re-runable in Yocto. Some of our patch tasks patch and then patch over those patches dynamically, which means the original patch no longer apply at all (so it's not reversible). This causes extra pain when trying to develop patch sets against an asset because one cannot simply roll forwards and backwards in the patch history (in devshell using quilt, for example), because our do_patch[postfuncs] have sullied the environment.

More information: we currently use do_patch[postfuncs] in a few places to first tee-up things like BB_REDHAWK_PROCESSOR and then globally clobber it in the source tree with a sed expression. We have to do the same thing against Makefile.am for over half a dozen different things that are part of the core framework templates of existing assets. These kinds of patches should be moved to places like do_install[prefuncs], do_configure[prefuncs], etc. -- wherever it feels more appropriate. As always these functions should result in a no-operation if they've already applied their changes.