Skip to contentSkip to conversation

apply-patches: catch unexpected failure

PATCH New Romain Naour 2 participants 4 messages Jul 5, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 apply-patches: catch unexpected failure

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

Cc S?bastien Szymanski <[email protected]>
---
 support/scripts/apply-patches.sh | 3 +++
 1 file changed, 3 insertions(+)
support/scripts/apply-patches.sh +3 -0
index 694302d..11fa5bf 100755
@@ -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
Signature · 1 line
2.5.5
#1 lore raw

PATCH 1/1 apply-patches: catch unexpected failure

Hello,

Quoted 5 lines · Romain Naour

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.

Quoted 7 lines

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

Cc S?bastien Szymanski <[email protected]>
---
 support/scripts/apply-patches.sh | 3 +++
 1 file changed, 3 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 apply-patches: catch unexpected failure

In reply to Romain Naour

Hello,

Quoted 5 lines · Romain Naour

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.

Quoted 7 lines

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

Cc S?bastien Szymanski <[email protected]>
---
 support/scripts/apply-patches.sh | 3 +++
 1 file changed, 3 insertions(+)

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

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/1 apply-patches: catch unexpected failure

Hi Thomas,
Le 05/07/2016 ? 17:43, Thomas Petazzoni a ?crit :

Quoted 10 lines

Hello,

Quoted 7 lines · Romain Naour

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

Quoted 7 lines
Quoted 5 lines
Cc S?bastien Szymanski <[email protected]>
---
 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

Quoted 3 lines

Thomas