Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"git binary diffs are not supported" error using yocto

Tags:

patch

yocto

I have one git repo where i maintain some binary files. Now i want to create patches of last few commits & integrate them in Yocto build.

I have created patches like

git format-patch -3 --binary

Now i have integrate these patches in Yocto recipe files. And Yocto gives below error while git apply in do_patch()

git binary diffs are not supported.
Patch xyz.patch does not apply (enforce with -f)

Am i missing anything while creating binary patches here?

or

Is there any Yocto Hacks which i can do in my recipe file to handle with binary patches?

like image 339
Jeegar Patel Avatar asked Oct 16 '25 04:10

Jeegar Patel


2 Answers

I also ran into this with patches created using the yocto tooling (devtool update-recipe), and I do not want to change the way I create the patches.

By default yocto uses quilt to apply patches, I addressed the issue using git instead.

This can be configured by setting the PATCHTOOL variable in the recipe:

PATCHTOOL = "git"
like image 108
Fabian Avatar answered Oct 18 '25 13:10

Fabian


Maybe you need to use this cmd with additional flag --full-index

git format-patch -3 --full-index --binary

https://git-scm.com/docs/git-format-patch --binary In addition to --full-index, output a binary diff that can be applied with git-apply.

like image 26
Yuriy Gyerts Avatar answered Oct 18 '25 11:10

Yuriy Gyerts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!