All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Suggestion to "support/scripts/apply-patches.sh: do not apply patches with renames"
@ 2021-05-12 23:27 Ryota Kinukawa
  2021-05-15  6:44 ` Peter Korsgaard
  0 siblings, 1 reply; 15+ messages in thread
From: Ryota Kinukawa @ 2021-05-12 23:27 UTC (permalink / raw)
  To: buildroot

Hi. Thank you for your great work, Buildroot team.
I'm writing this email for suggestions to support/scripts/apply-patches.sh.

Recently, I was working with buildroot to apply patches-4.14.164-rt73.
It included a patch((patches-4.14.164-rt73/0462-..)) which renames a file.
This caused the build to terminate with an error.

The reason for this is that apply-patches.sh exits when it finds a patch
that contains a rename.
This feature is kind for users who use legacy `patch` commands,
but not kind for current users.

So I'd like to suggest adding a kind of this line
  `grep -q "^BR2_*_LEGACY_PATCH_CMD=y" "$BR2_CONFIG" && \`
to below if statement.

```
if ${uncomp} "${path}/$patch" | grep -q "^rename from" && \
   ${uncomp} "${path}/$patch" | grep -q "^rename to" ; then
```

Parsing the results of the `patch` is dependent on the implementation of it,
so I think it would be better to get them who use `legacy patch` to set it
explicitly.
(For considering backward compatibility,
(it might be better if the environment variable had the opposite meaning.

How about this idea?

In making this suggestion I have read the following two threads.
- http://lists.busybox.net/pipermail/buildroot/2017-May/191794.html
- http://lists.busybox.net/pipermail/buildroot/2017-June/195335.html

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210513/2cfdb0db/attachment.html>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-05-19  8:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 23:27 [Buildroot] Suggestion to "support/scripts/apply-patches.sh: do not apply patches with renames" Ryota Kinukawa
2021-05-15  6:44 ` Peter Korsgaard
2021-05-15  9:40   ` Yann E. MORIN
2021-05-15 10:57     ` Romain Naour
2021-05-15 11:19       ` Yann E. MORIN
2021-05-15 11:46         ` Romain Naour
2021-05-15 12:01           ` Yann E. MORIN
2021-05-16  0:51     ` Ryota Kinukawa
2021-05-16  8:18     ` Ryota Kinukawa
2021-05-17 12:46       ` Yann E. MORIN
2021-05-17 18:55       ` Arnout Vandecappelle
2021-05-19  3:28     ` [Buildroot] [PATCH] support/dependencies, scripts: accept patches with renames pojiro.jp at gmail.com
2021-05-19  6:43       ` Yann E. MORIN
2021-05-19  8:34     ` [Buildroot] [PATCH v2] " pojiro.jp at gmail.com
2021-05-19  8:46       ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.