-
Notifications
You must be signed in to change notification settings - Fork 75
How to resolve warnings when patch fuzz is detected
Poky has now started issuing warnings while executing do_patch when patches are applied to any recipe source with some of the patch context ignored.
This happens when the newly added line was actually added in a completely wrong location, or it was already in the original source, and was added for the second time.
Below is an example of such a warning: WARNING: autogen-native-5.18.12-r0 do_patch: Some of the context lines in patches were ignored. This can lead to incorrectly applied patches. The context lines in the patches can be updated with devtool
For more information about why these warnings are generated: 1. http://lists.openembedded.org/pipermail/openembedded-core/2018-March/14 2. https://bugzilla.yoctoproject.org/show_bug.cgi?id=10450
Hence, if any developer updates any of the recipe versions in the meta-luv layer, they should build luv to ensure these warnings are not observed. If they are observed, the warnings can be eliminated by:
1. Use devtool command as explained by the warning. First, unpack the source into devtool workspace:
devtool modify <recipe>
This will apply all the patches, and create new commits out of them in the workspace - with the patch context
updated. Then, replace the patches in the recipe layer:
devtool finish --force-patch-refresh <recipe> <layer_path>
The patch updates need be reviewed (preferably, with a side-by-side diff tool) to ensure they are indeed doing the
right thing i.e. they get applied in the correct location and they do not introduce duplicate lines, or otherwise
do things that are not anymore necessary.
2. Clone or download the recipe source separately. If not a git repository, do the following at the base directory of
the source code:
git init
git add *
Then start rebasing the patches, using git am. If there are any conflicts, resolve them. The rebased and resolved
patches can then be applied as the updated patches to the recipe.
Build LUV again to ensure no further warnings are seen.