All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] Suggestion to "support/scripts/apply-patches.sh: do not apply patches with renames"
Date: Sat, 15 May 2021 08:44:04 +0200	[thread overview]
Message-ID: <87fsyopkcr.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <CAALxPJ0qprnhxWtHGg7oeY=Ws4+w3Wt-_hdM1WvbL6B42jQO5g@mail.gmail.com> (Ryota Kinukawa's message of "Thu, 13 May 2021 08:27:05 +0900")

>>>>> "Ryota" == Ryota Kinukawa <pojiro.jp@gmail.com> writes:

Hi,

 > 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?

The problem with such an option is that it describes a property of the
build host, not of the Buildroot configuration - And we still wouldn't
be able to use rename patches as long as that option was supported.

So we want apply-patches.sh to work the same for everyone.

But we're now 4 years later, so perhaps it is time to unconditionally
drop support for GNU patch < 2.7?

GNU patch 2.7 was released in September 2012, so 8.5 years ago:

https://savannah.gnu.org/forum/forum.php?forum_id=7361

Thomas, Yann - Any ideas how common such old patch version are nowadays?

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2021-05-15  6:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fsyopkcr.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.