[Buildroot] [PATCH 1/1] support/scripts/: remove -E flag from patch call

Andrey Nechypurenko andreynech at gmail.com
Mon Jan 3 11:29:11 UTC 2022


Hi Yann,

>> -E flag instructs patch to remove empty files. However, in some cases
>> empty files are essential. If they are missing, build could be broken
>> or other bad things can happen.
>
> Do you have an example of a publicly accessible package that has this
> issue?

No I have not. In my case this is not a mainlined driver for the touch
controller provided by the display manufacturer.

> So we have an antagonist situation: some patches will want to rem ove
> files, and some patches will want to not remove files. We can't satisfy
> both, obviously.
>
> So, unfortunately, it is not possible to apply your patch.

I understand your concern. So it sounds like a need for configurability
here.

> Unless someone comes up with a better idea...

Not sure if it is a good idea, but maybe the problem could be solved using
series files? Currently, there is already -p1 parameter which could be
specified in the series files. Brief look at the relevant part of the
apply-patches.sh reveals that it is ignored :-) but it could be changed.
After that, the script can walk through patch directories where patches with
+++ /dev/null are found, generate or update series files to use the -E flag
together with -p1. This solution would not break existing packages and
provide flexibility for the new packages where developers can decide whether
to add -E (or maybe some other flags) to patch invocation using series
files.

What do you think about it?

Best regards,
Andrey.



More information about the buildroot mailing list