forked from kiss-community/kiss
kiss: Clean up leftover cache entries
This commit is contained in:
parent
0d5499f7b8
commit
d3b988300a
16
kiss
16
kiss
@ -1138,11 +1138,17 @@ pkg_clean() {
|
|||||||
# to the build.
|
# to the build.
|
||||||
[ "$KISS_DEBUG" != 1 ] || return
|
[ "$KISS_DEBUG" != 1 ] || return
|
||||||
|
|
||||||
# Block 'Ctrl+C' while cache is being cleaned.
|
# Create a list containing the current invocation's temporary
|
||||||
trap '' INT
|
# files and directories.
|
||||||
|
set +f -- "$mak_dir" "$pkg_dir" "$tar_dir" "$cac_dir/$pid-m"
|
||||||
|
|
||||||
# Remove temporary items.
|
# Go through the cache and add any entries which don't belong
|
||||||
rm -rf -- "$mak_dir" "$pkg_dir" "$tar_dir" "$cac_dir/$pid-m"
|
# to a currently running kiss instance.
|
||||||
|
for dir in "$cac_dir/"[bep]*-[0-9]*; do
|
||||||
|
[ -e "/proc/${dir##*-}" ] || set -- "$@" "$dir"
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -rf -- "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
args() {
|
args() {
|
||||||
@ -1240,7 +1246,7 @@ args() {
|
|||||||
r|remove)
|
r|remove)
|
||||||
pkg_order "$@"
|
pkg_order "$@"
|
||||||
|
|
||||||
for pkg in $redro; do
|
for pkg in $redro; do
|
||||||
pkg_remove "$pkg" "${KISS_FORCE:-check}"
|
pkg_remove "$pkg" "${KISS_FORCE:-check}"
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user