find-debuginfo.sh: Exit with real exit status in parallel jobs
Currently, when the script is executed in parallel (-jN), the
resulting exit status will always be 0.
The script execs an appropriate number of clones of itself, calling
run_job to run the actual workload. This then calls do_file(), saving
the exit status into "res.$jobid".
In do_file(), though, if an error occurs, exit is called. This causes
the entire exec'd shell to exit with status 0 (since there are almost
always echo calls as the last executed statement). The real exit
status is therefor never written to the "res.$jobid" files by run_job().
The simple solution is to use 'return' instead of 'exit'. A number
of minor adjustments are also made to propagate this properly so that
it is reported as the correct exit status.
While at it, I've incorporated a patch for find-debuginfo/30505.
Using this patch and another patch to the RPM package (submitted as
github issue #3215), failures of gdb-add-index.sh will now properly fail
the build instead of being swallowed. It should be much easier for
developers to figure out why their builds have failed should gdb crash.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30505
Signed-off-by: Keith Seitz <keiths@redhat.com>
This page took 0.059106 seconds and 5 git commands to generate.