* [Buildroot] [PATCH] apply-patches: run patch in batch mode
@ 2013-08-22 5:44 Arnout Vandecappelle
2013-08-22 8:09 ` Luca Ceresoli
2013-08-22 19:13 ` Ralph Siemsen
0 siblings, 2 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2013-08-22 5:44 UTC (permalink / raw)
To: buildroot
If the file to be patched is missing, then `patch' will interactively
ask for a file to be patched. This is annoying in e.g. the autobuilders
because they have to wait for a timeout instead of failing.
Giving the '-t' (dry-run) option to patch fixes this: it will skip the
missing file, and return a non-zero exit code. So the build cleanly
fails.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
I actually discovered this during my allyesconfig night build, where I
use make -k.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
support/scripts/apply-patches.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
index 2995ea9..e9c6869 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -80,7 +80,7 @@ function apply_patch {
echo ""
echo "Applying $patch using ${type}: "
echo $patch >> ${builddir}/.applied_patches_list
- ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}"
+ ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t
if [ $? != 0 ] ; then
echo "Patch failed! Please fix ${patch}!"
exit 1
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] apply-patches: run patch in batch mode
2013-08-22 5:44 [Buildroot] [PATCH] apply-patches: run patch in batch mode Arnout Vandecappelle
@ 2013-08-22 8:09 ` Luca Ceresoli
2013-08-22 18:02 ` Arnout Vandecappelle
2013-08-22 19:13 ` Ralph Siemsen
1 sibling, 1 reply; 7+ messages in thread
From: Luca Ceresoli @ 2013-08-22 8:09 UTC (permalink / raw)
To: buildroot
Arnout Vandecappelle (Essensium/Mind) wrote:
> If the file to be patched is missing, then `patch' will interactively
> ask for a file to be patched. This is annoying in e.g. the autobuilders
> because they have to wait for a timeout instead of failing.
>
> Giving the '-t' (dry-run) option to patch fixes this: it will skip the
"dry-run"? Of course not. :)
s/dry-run/batch mode/
> missing file, and return a non-zero exit code. So the build cleanly
> fails.
>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
With that fixed:
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Luca
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] apply-patches: run patch in batch mode
2013-08-22 8:09 ` Luca Ceresoli
@ 2013-08-22 18:02 ` Arnout Vandecappelle
2013-08-27 20:30 ` Peter Korsgaard
0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2013-08-22 18:02 UTC (permalink / raw)
To: buildroot
If the file to be patched is missing, then `patch' will interactively
ask for a file to be patched. This is annoying in e.g. the autobuilders
because they have to wait for a timeout instead of failing.
Giving the '-t' (batch mode) option to patch fixes this: it will skip the
missing file, and return a non-zero exit code. So the build cleanly
fails.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
I actually discovered this during my allyesconfig night build, where I
use make -k.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
support/scripts/apply-patches.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
index 2995ea9..e9c6869 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -80,7 +80,7 @@ function apply_patch {
echo ""
echo "Applying $patch using ${type}: "
echo $patch >> ${builddir}/.applied_patches_list
- ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}"
+ ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t
if [ $? != 0 ] ; then
echo "Patch failed! Please fix ${patch}!"
exit 1
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] apply-patches: run patch in batch mode
2013-08-22 5:44 [Buildroot] [PATCH] apply-patches: run patch in batch mode Arnout Vandecappelle
2013-08-22 8:09 ` Luca Ceresoli
@ 2013-08-22 19:13 ` Ralph Siemsen
2013-08-22 19:38 ` Arnout Vandecappelle
1 sibling, 1 reply; 7+ messages in thread
From: Ralph Siemsen @ 2013-08-22 19:13 UTC (permalink / raw)
To: buildroot
On Thu, Aug 22, 2013 at 07:44:15AM +0200, Arnout Vandecappelle (Essensium/Mind) wrote:
> If the file to be patched is missing, then `patch' will interactively
> ask for a file to be patched. This is annoying in e.g. the autobuilders
> because they have to wait for a timeout instead of failing.
Hi Arnout,
I believe you are seeing the same issue I reported recently.
My solution was to test for the patch existence explicitly:
http://patchwork.ozlabs.org/patch/266895/
-Ralph
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] apply-patches: run patch in batch mode
2013-08-22 19:13 ` Ralph Siemsen
@ 2013-08-22 19:38 ` Arnout Vandecappelle
2013-08-22 19:43 ` Ralph Siemsen
0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2013-08-22 19:38 UTC (permalink / raw)
To: buildroot
On 22/08/13 21:13, Ralph Siemsen wrote:
> On Thu, Aug 22, 2013 at 07:44:15AM +0200, Arnout Vandecappelle (Essensium/Mind) wrote:
>
>> If the file to be patched is missing, then `patch' will interactively
>> ask for a file to be patched. This is annoying in e.g. the autobuilders
>> because they have to wait for a timeout instead of failing.
>
> Hi Arnout,
>
> I believe you are seeing the same issue I reported recently.
> My solution was to test for the patch existence explicitly:
> http://patchwork.ozlabs.org/patch/266895/
It's not the patch file that doesn't exist, but the file that should be
patched.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] apply-patches: run patch in batch mode
2013-08-22 19:38 ` Arnout Vandecappelle
@ 2013-08-22 19:43 ` Ralph Siemsen
0 siblings, 0 replies; 7+ messages in thread
From: Ralph Siemsen @ 2013-08-22 19:43 UTC (permalink / raw)
To: buildroot
On Thu, Aug 22, 2013 at 09:38:58PM +0200, Arnout Vandecappelle wrote:
>
> It's not the patch file that doesn't exist, but the file that
> should be patched.
Oh I see what you mean. Yes, that could be an issue too.
So I guess both issues should get patched ;-)
-Ralph
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] apply-patches: run patch in batch mode
2013-08-22 18:02 ` Arnout Vandecappelle
@ 2013-08-27 20:30 ` Peter Korsgaard
0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2013-08-27 20:30 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:
Arnout> If the file to be patched is missing, then `patch' will interactively
Arnout> ask for a file to be patched. This is annoying in e.g. the autobuilders
Arnout> because they have to wait for a timeout instead of failing.
Arnout> Giving the '-t' (batch mode) option to patch fixes this: it will skip the
Arnout> missing file, and return a non-zero exit code. So the build cleanly
Arnout> fails.
Arnout> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Arnout> Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Arnout> ---
Arnout> I actually discovered this during my allyesconfig night build, where I
Arnout> use make -k.
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-08-27 20:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22 5:44 [Buildroot] [PATCH] apply-patches: run patch in batch mode Arnout Vandecappelle
2013-08-22 8:09 ` Luca Ceresoli
2013-08-22 18:02 ` Arnout Vandecappelle
2013-08-27 20:30 ` Peter Korsgaard
2013-08-22 19:13 ` Ralph Siemsen
2013-08-22 19:38 ` Arnout Vandecappelle
2013-08-22 19:43 ` Ralph Siemsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox