[arch-releng] [PATCH 9/9] [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: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- archiso/mkarchiso | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/archiso/mkarchiso b/archiso/mkarchiso index b40eedd..2ec1a75 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -149,13 +149,14 @@ to the iso/ directory. fi fi - # 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}" - fi - done + # 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 fi } -- 1.7.1
On 06/29/2010 08:40 PM, Gerardo Exequiel Pozzi wrote:
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: Gerardo Exequiel Pozzi<vmlinuz386@yahoo.com.ar> --- archiso/mkarchiso | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/archiso/mkarchiso b/archiso/mkarchiso index b40eedd..2ec1a75 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -149,13 +149,14 @@ to the iso/ directory. fi fi
- # 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}" - fi - done + # 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 fi }
Oops! Resending, new patch avail (add /tmp and /var/tmp, anyway these dirs currently are empty, but if more pkgs are add, maybe...) http://mailman.archlinux.org/pipermail/arch-releng/2010-June/001121.html Remember that all patches can be pulled from git://github.com/djgera/archiso.git in branch "djgera" -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
Am 30.06.2010 05:26, schrieb Gerardo Exequiel Pozzi:
Oops! Resending, new patch avail (add /tmp and /var/tmp, anyway these dirs currently are empty, but if more pkgs are add, maybe...) http://mailman.archlinux.org/pipermail/arch-releng/2010-June/001121.html
Remember that all patches can be pulled from git://github.com/djgera/archiso.git in branch "djgera"
Okay, I'll review them on-list, but pull them from there eventually. IMO, we should standardize this process for arch-releng: 1) Patch series (more than one patch) are to be posted as a series using git-send-email for review, with a git URL to pull from in the introduction mail. 2) A single patch can be posted without pull URL, although it is still preferred. As you are virtually the only one sending patches here, it's already being done this way, but when other people contribute, they should do the same.
Am 30.06.2010 10:50, schrieb Thomas Bächler:
Remember that all patches can be pulled from git://github.com/djgera/archiso.git in branch "djgera"
Okay, I'll review them on-list, but pull them from there eventually.
Okay, no comments, no objections, all patches are pushed to master.
On 06/30/2010 02:14 PM, Thomas Bächler wrote:
Am 30.06.2010 10:50, schrieb Thomas Bächler:
Remember that all patches can be pulled from git://github.com/djgera/archiso.git in branch "djgera"
Okay, I'll review them on-list, but pull them from there eventually. Okay, no comments, no objections, all patches are pushed to master.
Thank you :) -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
participants (2)
-
Gerardo Exequiel Pozzi
-
Thomas Bächler