makepkg: clean up pkgver and prepare log files

Delete log files for the pkgver and prepare functions if -c,--clean is
passed.

Fixes FS#51039 and FS#51075

Includes patch submitted by Christian Braun.

Signed-off-by: Michael Straube <straubem@gmx.de>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Michael Straube 2017-04-12 16:53:53 +02:00 committed by Allan McRae
parent 3c013f68ac
commit 4f2fea240d

View file

@ -137,6 +137,12 @@ clean_up() {
if [[ -n $pkgbase ]]; then if [[ -n $pkgbase ]]; then
local fullver=$(get_full_version) local fullver=$(get_full_version)
# Can't do this unless the BUILDSCRIPT has been sourced. # Can't do this unless the BUILDSCRIPT has been sourced.
if (( PKGVERFUNC )); then
rm -f "${pkgbase}-${fullver}-${CARCH}-pkgver.log"*
fi
if (( PREPAREFUNC )); then
rm -f "${pkgbase}-${fullver}-${CARCH}-prepare.log"*
fi
if (( BUILDFUNC )); then if (( BUILDFUNC )); then
rm -f "${pkgbase}-${fullver}-${CARCH}-build.log"* rm -f "${pkgbase}-${fullver}-${CARCH}-build.log"*
fi fi