run: instruct 'exec' to ignore stderr output

Unless '-ignorestderr' is set on 'exec' in expect, any output on stderr
is interpreted as execution failure. In this case, 'create_iso' logs
some diagnostics but does not fail.

We repeatedly promote our ISOs to be bootable from USB storage.
Therefore, we have a hard dependency on 'isohybrid' and should fail in
the case that the tool is missing.
This commit is contained in:
Christian Helmuth 2014-01-13 16:28:04 +01:00
parent 6a076ff621
commit a3e30cc96c
2 changed files with 4 additions and 5 deletions

View File

@ -38,7 +38,7 @@ gen_iso_image = mkisofs -f -l -R -hide-rr-moved -jcharset utf-8 \
$(ISOIMG) iso:
@$(call gen_iso_image, $(ISOIMG) $(ISODIR))
@which isohybrid > /dev/null && isohybrid $(ISOIMG)
@isohybrid $(ISOIMG)
STRIP_FILES = $(wildcard genode/*) $(wildcard pistachio/*)

View File

@ -422,11 +422,10 @@ proc create_iso_image_from_run_dir { } {
exec rm -f "[run_dir].iso"
#
# The 'create_iso' tool returns a non-zero return code even if
# successful. So we ignore the return code here.
# The 'create_iso' write diagnostics to stderr, which are interpreted as
# execution failure by expect unless '-ignorestderr' is set on 'exec'.
#
catch { exec [genode_dir]/tool/create_iso iso ISO=[run_dir] }
if {![file exists "[run_dir].iso"]} {
if {[catch {exec -ignorestderr [genode_dir]/tool/create_iso iso ISO=[run_dir]} ]} {
puts stderr "Error: ISO image creation failed"
exit -5
}