[yocto] bitbake: git and patch problem
Bruce Ashfield
bruce.ashfield at windriver.com
Mon Mar 5 06:09:11 PST 2018
On 2018-03-05 5:33 AM, EXTERNAL van Riel Rob (ENTER, BT-CO/ENG1.1) wrote:
> I'm experiencing strange (at least to my eyes) behaviour from bitbake. My recipe specifies a git repository as the main SRC_URI, then, in a variant created using an append file adds a patch like this:
>
> SRC_URI_append_mystuff += "file://mystuff.patch"
>
> As expected, this grabs the sources from the git repository, and then applies the patch. Rather unexpectedly to me, and also rather inconveniently, it then adds and commits the changes to the local git clone.
Out of curiosity .. why is that unexpected, or inconvenient ? I never
want a git repository to have dirty/unchecked in files, so having the
build system apply a patch, make sure it is a valid format, signed-off-by
and then committed is a good thing.
>
> Is this expected behaviour, and if so, is there any way to prevent it?
It is, but you can change what applies the patch.
Have a look at classes/patch.bbclass, and in particular the variable
PATCHTOOL.
If yours is set to 'git', git will be used. But by default, it is
typically set to 'quilt' .. so it has been changed from the default
in your environment.
Bruce
>
> My environment is based on poky-fido-13.0.1.
>
> Best regards,
>
> Rob van Riel
>
More information about the yocto
mailing list