mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 00:20:05 -07:00
kiss: Fix bug with strict cache removal
Turns out nested package manager processes would wipe the cache earlier than expected when installing packages. As all these nested processes are involved in is installation, this changes pkg_clean to have them only wipe tar_dir (the only directory they use).
This commit is contained in:
parent
268504bec8
commit
6555df6209
17
kiss
17
kiss
@ -1675,9 +1675,20 @@ pkg_update() {
|
|||||||
|
|
||||||
pkg_clean() {
|
pkg_clean() {
|
||||||
# Clean up on exit or error. This removes everything related to the build.
|
# Clean up on exit or error. This removes everything related to the build.
|
||||||
# This only runs inside the top-level KISS process.
|
case ${KISS_DEBUG:-0}-${KISS_LVL:-0} in
|
||||||
case ${KISS_DEBUG:-0}-${KISS_LVL:-0} in 0-0)
|
0-0)
|
||||||
rm -rf "$tmp_dir"
|
# If we are exiting the top-level package manager process, wipe
|
||||||
|
# the entire temporary directory.
|
||||||
|
rm -rf "$tmp_dir"
|
||||||
|
;;
|
||||||
|
|
||||||
|
0-*)
|
||||||
|
# If we are exiting a nested package manager process, wipe only
|
||||||
|
# the tar temporary directory. Files in this directory may not
|
||||||
|
# be owned by user of the top-level process and therefore cannot
|
||||||
|
# be removed.
|
||||||
|
rm -rf "$tar_dir"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user