buildroot.buildroot.org archive mirror
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] apply-patches: catch unexpected failure
@ 2016-07-05 11:02 Romain Naour
  2016-07-05 15:37 ` Thomas Petazzoni
  2016-07-05 15:43 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Romain Naour @ 2016-07-05 11:02 UTC (permalink / raw)
  To: buildroot

As reported by S?bastien Szymanski [1], the apply-patches script
doesn't stop if a tar command can't extract an archive.

Use "set -e" to exit immediately if a command return an error.

[1] http://patchwork.ozlabs.org/patch/626196

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: S?bastien Szymanski <sebastien.szymanski@armadeus.com>
---
 support/scripts/apply-patches.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
index 694302d..11fa5bf 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -31,6 +31,9 @@
 # applied. The list of the patches applied is stored in '.applied_patches_list'
 # file in the build directory.
 
+# We want to catch any unexpected failure, and exit immediately.
+set -e
+
 silent=
 if [ "$1" = "-s" ] ; then
     # add option to be used by the patch tool
-- 
2.5.5

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

* [Buildroot] [PATCH] apply-patches: catch unexpected failure
  2016-07-05 11:02 [Buildroot] [PATCH] apply-patches: catch unexpected failure Romain Naour
@ 2016-07-05 15:37 ` Thomas Petazzoni
  2016-07-05 15:43 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-07-05 15:37 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  5 Jul 2016 13:02:09 +0200, Romain Naour wrote:
> As reported by S?bastien Szymanski [1], the apply-patches script
> doesn't stop if a tar command can't extract an archive.
> 
> Use "set -e" to exit immediately if a command return an error.
> 
> [1] http://patchwork.ozlabs.org/patch/626196
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: S?bastien Szymanski <sebastien.szymanski@armadeus.com>
> ---
>  support/scripts/apply-patches.sh | 3 +++
>  1 file changed, 3 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] apply-patches: catch unexpected failure
  2016-07-05 11:02 [Buildroot] [PATCH] apply-patches: catch unexpected failure Romain Naour
  2016-07-05 15:37 ` Thomas Petazzoni
@ 2016-07-05 15:43 ` Thomas Petazzoni
  2016-07-05 15:46   ` Romain Naour
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2016-07-05 15:43 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  5 Jul 2016 13:02:09 +0200, Romain Naour wrote:
> As reported by S?bastien Szymanski [1], the apply-patches script
> doesn't stop if a tar command can't extract an archive.
> 
> Use "set -e" to exit immediately if a command return an error.
> 
> [1] http://patchwork.ozlabs.org/patch/626196
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: S?bastien Szymanski <sebastien.szymanski@armadeus.com>
> ---
>  support/scripts/apply-patches.sh | 3 +++
>  1 file changed, 3 insertions(+)

In fact, this broke many packages, so I reverted.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] apply-patches: catch unexpected failure
  2016-07-05 15:43 ` Thomas Petazzoni
@ 2016-07-05 15:46   ` Romain Naour
  0 siblings, 0 replies; 4+ messages in thread
From: Romain Naour @ 2016-07-05 15:46 UTC (permalink / raw)
  To: buildroot

Hi Thomas,
Le 05/07/2016 ? 17:43, Thomas Petazzoni a ?crit :
> Hello,
> 
> On Tue,  5 Jul 2016 13:02:09 +0200, Romain Naour wrote:
>> As reported by S?bastien Szymanski [1], the apply-patches script
>> doesn't stop if a tar command can't extract an archive.
>>
>> Use "set -e" to exit immediately if a command return an error.
>>
>> [1] http://patchwork.ozlabs.org/patch/626196
>>
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> Cc: S?bastien Szymanski <sebastien.szymanski@armadeus.com>
>> ---
>>  support/scripts/apply-patches.sh | 3 +++
>>  1 file changed, 3 insertions(+)
> 
> In fact, this broke many packages, so I reverted.

Ok, sorry about that :-/

Romain

> 
> Thomas
> 

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

end of thread, other threads:[~2016-07-05 15:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-05 11:02 [Buildroot] [PATCH] apply-patches: catch unexpected failure Romain Naour
2016-07-05 15:37 ` Thomas Petazzoni
2016-07-05 15:43 ` Thomas Petazzoni
2016-07-05 15:46   ` Romain Naour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).