Commit 1114731c authored by Gerardo Exequiel Pozzi's avatar Gerardo Exequiel Pozzi
Browse files

[archiso] Rewrite cleanup step in mkarchiso

Currently works partially since in bash "*" is not expanded.
Old dirs removed, always empty dirs removed from list.
Also cleanup sync databases from pacman 3.4.0, avoiding problems with
pacman -Sy since "sync" directory is deleted.

Signed-off-by: default avatarGerardo Exequiel Pozzi <>
parent 6a0333c9
......@@ -149,13 +149,18 @@ to the iso/ directory.
# delete a lot of unnecessary cache/log files
kill_dirs="var/abs var/cache/man var/cache/pacman var/lib/pacman/sync var/log/* var/mail tmp/* initrd"
for x in ${kill_dirs}; do
if [ -e "${work_dir}/root-image/${x}" ]; then
rm -rf "${work_dir}/root-image/${x}"
# Delete pacman database sync cache files (*.tar.gz)
find "${work_dir}/root-image/var/lib/pacman" -maxdepth 1 -type f -delete
# Delete pacman database sync cache
find "${work_dir}/root-image/var/lib/pacman/sync" -delete
# Delete pacman package cache
find "${work_dir}/root-image/var/cache/pacman/pkg" -type f -delete
# Delete all log files, keeps empty dirs.
find "${work_dir}/root-image/var/log" -type f -delete
# Delete all temporary files and dirs
find "${work_dir}/root-image/var/tmp" -mindepth 1 -delete
# Delete all temporary files and dirs
find "${work_dir}/root-image/tmp" -mindepth 1 -delete
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment