Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] fs: Bail out on errors in fakeroot script
@ 2015-02-24 15:47 Stefan Sørensen
  2015-02-24 15:47 ` [Buildroot] [PATCH 2/2] fs: add custom fakeroot script support Stefan Sørensen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stefan Sørensen @ 2015-02-24 15:47 UTC (permalink / raw)
  To: buildroot

Currently, the generated fakeroot script has no error checking causing
make to continue building even if some of the fakeroot script commands
have failed. This can cause e.g. using an invalid device tables to go
unnoticed.

So add a "set -e" to the start of the fakeroot script so it will exit
with a failure code as soon as one of the script commands fails.

Signed-off-by: Stefan S?rensen <stefan.sorensen@spectralink.com>
---
 fs/common.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/common.mk b/fs/common.mk
index 13bf4ad..1d3926f 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -72,6 +72,7 @@ $$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
 	rm -f $$(FAKEROOT_SCRIPT)
 	rm -f $$(TARGET_DIR_WARNING_FILE)
 	rm -f $$(USERS_TABLE)
+	echo "set -e" >> $$(FAKEROOT_SCRIPT)
 	echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
 ifneq ($$(ROOTFS_DEVICE_TABLES),)
 	cat $$(ROOTFS_DEVICE_TABLES) > $$(FULL_DEVICE_TABLE)
-- 
1.9.3

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

end of thread, other threads:[~2015-06-30 13:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-24 15:47 [Buildroot] [PATCH 1/2] fs: Bail out on errors in fakeroot script Stefan Sørensen
2015-02-24 15:47 ` [Buildroot] [PATCH 2/2] fs: add custom fakeroot script support Stefan Sørensen
2015-02-24 21:39   ` Yann E. MORIN
2015-02-25 12:02     ` Sørensen, Stefan
2015-06-30 13:31       ` Thomas Petazzoni
2015-02-24 18:27 ` [Buildroot] [PATCH 1/2] fs: Bail out on errors in fakeroot script Yann E. MORIN
2015-03-08 21:23 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox