How to use devtool to fix an outdated patch
Asked Answered
S

1

8

I'm porting a layer to kirkstone which as an outdated patch which cannot be applied anymore (to u-boot). Can devtool be used to fix that patch? The problem is that per default devtool modify applies the patches and therefore fails to load the workspace.

Sexual answered 14/6, 2022 at 13:9 Comment(1)
The output gave hint. I'll try and update this post accordingly: ``` The context lines in the patches can be updated with devtool: devtool modify u-boot devtool finish --force-patch-refresh u-boot <layer_path> ```Sexual
C
7

The patch refresh is indeed the best method if devtool modify can apply the patches with an offset. When devtool modify fails to apply the patches, one way to update the patches is:

  1. Remove the patches which no longer apply from SRC_URI
  2. Run devtool modify <recipe> as usual
  3. Port the patches manually and re-commit them
  4. Terminate with devtool finish <recipe> <destination>

Of course, if a patch does not apply because it was integrated upstream, the right solution is to just remove it from SRC_URI.

Chios answered 19/6, 2022 at 14:37 Comment(1)
Nice to know: If your version of devtool doesn't support the sub command "finish" you can accomplish the same with: devtool update-recipe [-a <layer-name>] <rcp-name> devtool reset <rcp-name>Brendabrendan

© 2022 - 2024 — McMap. All rights reserved.