From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] support/scripts/apply-patches.sh: do not apply patches with renames
Date: Fri, 12 May 2017 17:53:40 +0200 [thread overview]
Message-ID: <20170512175340.6e94a47c@free-electrons.com> (raw)
In-Reply-To: <20170512154039.GA2955@scaer>
Hello,
On Fri, 12 May 2017 17:40:39 +0200, Yann E. MORIN wrote:
> Meh. path-2.7 was released 5 years ago. Oh well, let's be kind for those
> stuck with ancient entreprise-grade distros... ;-)
Exactly :)
> Oh-oh... Not good: the '-a' will be passed as an option to grep; this
> is not a [...] construct.
>
> What you want instead is:
>
> if grep -q "^rename from" ${path}/${patch} && \
> grep -q "^rename to" ${path}/${patch} ; then
OK, will fix.
However, what bothers me with this is that if the patch description
contains "rename from" and "rename to" at the beginning of two lines,
then it will also trigger this condition.
But I'm not sure if it's a really realistic case, and if it ever
happens, we can always fix/improve the script. Unless there is a better
but still simple way to check if a patch uses renames. Ideally we would
want patch >= 2.7 to bail out if there's a rename, but I couldn't find
any option doing this... and this option would anyway not exist with
patch < 2.7.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
prev parent reply other threads:[~2017-05-12 15:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 10:29 [Buildroot] [PATCH] support/scripts/apply-patches.sh: do not apply patches with renames Thomas Petazzoni
2017-05-12 15:40 ` Yann E. MORIN
2017-05-12 15:53 ` Thomas Petazzoni [this message]
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=20170512175340.6e94a47c@free-electrons.com \
--to=thomas.petazzoni@free-electrons.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox