Patching a patch from a vendor
I'm using Yocto version: scarthgap.
I have a situation in vendor's repo, that has patches that needed to be changed (one of them is as simple as adding the "Upstream-Status:" string to the top of the patch file.
Is this a "thing"? I don't want to be changing the vendor's recipes and patches (it's the qoriq stuff under NXP) but I need to fix some obvious errors.
My problem is that my patches will be applied after theirs so for instance, the "Upstream-Status" fix is already too late and will be reported when bitbake is run.
I have some recipes in the qoriq repos that have errors in them (including files that no longer exist).
Advice would be appreciated.
Cheers!!
Hi John,
Quoted 6 lines · John via lists.yoctoproject.org
I'm using Yocto version: scarthgap.
I have a situation in vendor's repo, that has patches that needed to be changed (one of them is as simple as adding the "Upstream-Status:" string to the top of the patch file.
Is this a "thing"? I don't want to be changing the vendor's recipes and patches (it's the qoriq stuff under NXP) but I need to fix some obvious errors.
Don't patch patches, replace them.
Have your own bbappend in your own layer which replaces the patch with what you need.
A simple
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
in a bbappend that can be found by BitBake in your layer.
Then add your patch that replaces NXP's patch with yours, in a directory next to the bbappend.
Or even better, contact NXP and give them the appropriate patches so that you don't have to carry those in your own later.
Cheers,
Quentin
Quoted 16 lines · Quentin Schulz via lists.yoctoproject.org
Quoted 6 lines
I'm using Yocto version: scarthgap.
I have a situation in vendor's repo, that has patches that needed to be changed (one of them is as simple as adding the "Upstream-Status:" string to the top of the patch file.
Is this a "thing"? I don't want to be changing the vendor's recipes and patches (it's the qoriq stuff under NXP) but I need to fix some obvious errors.
Don't patch patches, replace them.
Have your own bbappend in your own layer which replaces the patch with what you need.
A simple
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Quoted 7 lines
in a bbappend that can be found by BitBake in your layer.
Then add your patch that replaces NXP's patch with yours, in a directory next to the bbappend.
Or even better, contact NXP and give them the appropriate patches so that you don't have to carry those in your own later.
I'd suggest forking the layer, and fixing everything necessary actually. Fixing things with bbappends works in limited cases, and this looks like it's less complicated to fork.
And of course contact the vendor and explain to them what had to be done and whether they can fix the layer directly.
Alex
So this is an NXP product and their 1st response to any of my queries is to ask for the processor for which my response is T1024RDB 64bit. They respond that they don't support Yocto for that product beyond dunfell. Since my customer's requirement is to get them off of dunfell and onto scarthgap, I have to work around NXP. People keep telling me to talk to them and NXP has made it quite clear that they will not entertain any questions about that product as far as Yocto Scarthgap is concerned.
I am more than willing to share my fix (if I can figure one out) here but needless to say, I don't support NXP beyond my personally tagged version of "I'm-Too-Old-to-be-Wasting-My-Time".
I'm unable to come up with a bbappend patch to replace an erroneous 'require' statement in an 'inc' file. I need to remove the "require" statement from 3 recipes (again, from qoriq which is NXP) since the required file no longer exists.
Cheers!!
Hi John,
Quoted 6 lines · John via lists.yoctoproject.org
So this is an NXP product and their 1st response to any of my queries is to ask for the processor for which my response is T1024RDB 64bit. They respond that they don't support Yocto for that product beyond dunfell. Since my customer's requirement is to get them off of dunfell and onto scarthgap, I have to work around NXP. People keep telling me to talk to them and NXP has made it quite clear that they will not entertain any questions about that product as far as Yocto Scarthgap is concerned.
I am more than willing to share my fix (if I can figure one out) here but needless to say, I don't support NXP beyond my personally tagged version of "I'm-Too-Old-to-be-Wasting-My-Time".
I'm unable to come up with a bbappend patch to replace an erroneous 'require' statement in an 'inc' file. I need to remove the "require" statement from 3 recipes (again, from qoriq which is NXP) since the required file no longer exists.
Depending on what you need (which is often not THAT much), you can simply "steal" what you need from your vendor BSP layer, and include it in your own layer and just not use the vendor BSP layer.
You can also do what Alex suggested of simply forking their layer and fixing stuff as you go.
For the "require" part there are multiple nasty ways to do it, I would simply fix the recipe to not require it (and since you cannot undo a require..., you need to replace the whole recipe).
Cheers,
Quentin