Message ID | 1424792855-14278-1-git-send-email-stefan.sorensen@spectralink.com |
---|---|
State | Accepted |
Headers | show |
Stefan, All, On 2015-02-24 16:47 +0100, Stefan Sørensen spake thusly: > 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> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Regards, Yann E. MORIN. > --- > 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 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
Dear Stefan Sørensen, On Tue, 24 Feb 2015 16:47:34 +0100, Stefan Sørensen wrote: > 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> Applied, thanks! Thomas
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)
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(+)