[OE-core] using devtool for rebasing patches

Paul Eggleton paul.eggleton at linux.intel.com
Thu Nov 3 19:34:27 UTC 2016


On Fri, 04 Nov 2016 08:29:26 Paul Eggleton wrote:
> Hi Alex,
> 
> On Thu, 03 Nov 2016 18:01:27 Alexander Kanavin wrote:
> > it would be very useful if devtool offered support for rebasing source
> > patches when they fail to apply, but currently there does not seem to be
> > any such feature:
> > 
> > ak at kanavin-desktop:~/development/poky/build$ devtool modify libksba
> > Parsing recipes..done.
> > NOTE: Fetching libksba...
> > NOTE: Unpacking...
> > NOTE: Patching...
> > ERROR: Applying 'ksba-add-pkgconfig-support.patch' failed:
> > checking file Makefile.am
> > Hunk #1 FAILED at 21.
> > 1 out of 1 hunk FAILED
> > checking file configure.ac
> > Hunk #1 succeeded at 414 (offset 14 lines).
> > checking file ksba.pc.in
> > checking file src/ksba.m4
> > ERROR: Function failed: patch_do_patch
> > ak at kanavin-desktop:~/development/poky/build$
> > 
> > What devtool could do here is apply the patches that can be applied and
> > then partially apply the patches that fail. Then give the developer some
> > kind of UI for dealing with the rejected hunks (which typically means
> > finding the place in the target file where the changes should go and
> > then manually editing them in, while looking at the original patch).
> > 
> > Without this feature devtool is half as useful as it could be
> > particularly for recipe version updates.
> 
> "devtool upgrade" is designed specifically to handle the upgrade case and
> tries to rebase the old patches onto the new version, putting you into
> resolution mode with "git am" if it fails to apply a patch. I appreciate
> that you may now be working through sorting out all of the patches to
> reduce the fuzziness when applying, and that won't help in that scenario,
> but it would definitely be worth considering for upgrades.
> 
> I'm open to implementing better support for handling patch application
> failure for devtool modify - in fact there is a bug open for just that:
> 
>   https://bugzilla.yoctoproject.org/show_bug.cgi?id=8325

(Although admittedly that was mostly for an earlier issue - we ought to add a 
bit of description of where to go from here.)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the Openembedded-core mailing list