Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] support/scripts/apply-patches: use "git apply" as a fallback when applying patches
Date: Fri, 11 Jan 2019 09:15:52 +0100	[thread overview]
Message-ID: <20190111091552.72fba6ad@windsurf> (raw)
In-Reply-To: <87wonbhnny.fsf@tarshish>

Hello,

On Fri, 11 Jan 2019 05:35:13 +0200, Baruch Siach wrote:

> > Switching everybody to unconditionally use "git apply" seems a bit
> > risky, so instead we take a different route: if applying the patch
> > with "patch" fails, then we try with "git apply".  
> 
> This makes git a host dependency. Should we add host-git, or list git
> with host requirements?

It does not really make git a mandatory dependency. Indeed, "git apply"
is only tried if "patch" fails.

So, before my patch, if a patch failed to apply because "patch" failed,
then it aborted the build.

With my patch, if a patch fails to apply because "patch" failed, then
we will try "git apply". If "git apply" is not available, it will fail,
just like it used to be.

So my proposal doesn't *require* git, it only tries harder to apply
patches by using "git apply" if available.

Setups that used to work today without "git" installed will continue to
work with no change.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-01-11  8:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 20:30 [Buildroot] [PATCH] support/scripts/apply-patches: use "git apply" as a fallback when applying patches Thomas Petazzoni
2019-01-11  3:35 ` Baruch Siach
2019-01-11  8:15   ` Thomas Petazzoni [this message]
2019-01-13  8:00     ` Baruch Siach
2019-01-23 14:17       ` Arnout Vandecappelle
2019-01-23 20:34         ` Peter Korsgaard

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=20190111091552.72fba6ad@windsurf \
    --to=thomas.petazzoni@bootlin.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