From 528b3023a9b4c8a2c171dde6f4837f5fe511b19f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 24 Jul 2020 17:51:07 +0300 Subject: [PATCH] kiss: Don't return from pkg_clean This fixes an issue where a build failure alongside KISS_DEBUG having a value of '1' prevented the package manager from aborting. --- kiss | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/kiss b/kiss index 42b52b0..f25239a 100755 --- a/kiss +++ b/kiss @@ -1295,19 +1295,19 @@ pkg_updates() { pkg_clean() { # Clean up on exit or error. This removes everything related to the build. - [ "$KISS_DEBUG" != 1 ] || return + [ "$KISS_DEBUG" = 1 ] || { + # Create a list containing the current invocation's temporary files and + # directories. + set +f -- "$mak_dir" "$pkg_dir" "$tar_dir" - # Create a list containing the current invocation's temporary files and - # directories. - set +f -- "$mak_dir" "$pkg_dir" "$tar_dir" + # Go through the cache and add any entries which don't belong to a + # currently running kiss instance. + for dir in "$cac_dir/"[bep]*-[0-9]*; do + [ -e "/proc/${dir##*-}" ] || set -- "$@" "$dir" + done - # Go through the cache and add any entries which don't belong to a - # currently running kiss instance. - for dir in "$cac_dir/"[bep]*-[0-9]*; do - [ -e "/proc/${dir##*-}" ] || set -- "$@" "$dir" - done - - rm -rf -- "$@" + rm -rf -- "$@" + } } args() {