Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/libmakepkg
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2018-05-31 17:46:51 +0200
committerAllan McRae <allan@archlinux.org>2018-06-18 13:15:51 +1000
commit05a3641c76ba1c07dbec6fa1d9e9d3fcf6dec20c (patch)
treef62dd588636c39ca68669fd5c54af41846cf0d40 /scripts/libmakepkg
parentab1e92860bdc5388621e8314b8e1652590fa2b05 (diff)
makepkg: Don't use parameterless return
It's especially dangerous in trap handlers since the return value of the function becomes the return value of the last command before the trap, not the last command in the current function. This applies to any function executed in a trap handler, nested functions included. In one case, install_packages failed (via return 14), which was inside a conditional that then ran exit 14, which triggered the EXIT handler, which called clean_up, which called remove_deps, which had !RMDEPS and thus returned. The return value of remove_deps became the return value of install_packages, triggering the ERR handler, which (due to another problem) was still the user function handler, which then printed a misleading error message and overrode the exit code with 4. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/libmakepkg')
0 files changed, 0 insertions, 0 deletions