makepkg: properly localize some internal function variables

We leaked fullver and pkgarch all over the place, and only conditionally
unset the other variables. Marking them local is a more proactive
solution.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Eli Schwartz 2020-10-11 22:22:05 -04:00 committed by Allan McRae
parent f76bd2c6c1
commit c99a3cc867

View file

@ -862,6 +862,7 @@ install_package() {
}
check_build_status() {
local fullver pkgarch allpkgbuilt somepkgbuilt
if (( ! SPLITPKG )); then
fullver=$(get_full_version)
pkgarch=$(get_pkg_arch)
@ -904,7 +905,6 @@ check_build_status() {
exit $E_ALREADY_BUILT
fi
fi
unset allpkgbuilt somepkgbuilt
fi
}