pacman/scripts
Jan Alexander Steffens (heftig) 05a3641c76 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>
2018-06-18 13:15:51 +10:00
..
completion bash_completion.in - consider option "-n --native" in operation "-Q --query" 2018-05-12 21:29:12 +10:00
libmakepkg libmakepkg/lint_pkgbuild: squelch syntax error when a pkgname is empty 2018-06-18 13:15:51 +10:00
library makepkg: Move parseopts from library to libmakepkg 2016-10-22 20:50:54 +10:00
po Pull updated translations from Transifex 2018-05-28 09:25:04 +10:00
.gitignore makepkg: Move parseopts from library to libmakepkg 2016-10-22 20:50:54 +10:00
Makefile.am Remove all modelines from the project 2018-05-14 09:59:15 +10:00
makepkg-template.pl.in Remove all modelines from the project 2018-05-14 09:59:15 +10:00
makepkg.sh.in makepkg: Don't use parameterless return 2018-06-18 13:15:51 +10:00
pacman-db-upgrade.sh.in Remove all modelines from the project 2018-05-14 09:59:15 +10:00
pacman-key.sh.in Remove all modelines from the project 2018-05-14 09:59:15 +10:00
pkgdelta.sh.in Remove all modelines from the project 2018-05-14 09:59:15 +10:00
repo-add.sh.in Remove all modelines from the project 2018-05-14 09:59:15 +10:00
wrapper.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00