mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2024-06-02 04:56:10 +02:00
rebuilderd_worker: clean the package cache as well
Using paccache for this which keeps up to 3 versions per package, and also instructing it to keep any packages accessed in the past 2 weeks.
This commit is contained in:
parent
9512d912b8
commit
a6c56d65a9
|
@ -1,3 +1,8 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# remove leftover chroots that are more than a week old
|
||||
find /var/lib/repro -maxdepth 1 -name '*?_?*' -mtime +6 -exec rm -rf {} +
|
||||
|
||||
# clean the package cache but keep recently accessed files
|
||||
flock /var/lib/rebuilderd-worker/cache.lock \
|
||||
paccache -r -q -c /var/lib/rebuilderd-worker/cache --min-atime '2 weeks ago'
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[Unit]
|
||||
Description=Clean up stale repro chroots
|
||||
Description=Clean up rebuilderd-worker chroots and cache
|
||||
ConditionPathExists=/var/lib/repro
|
||||
ConditionPathExists=/var/lib/rebuilderd-worker/cache
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Unit]
|
||||
Description=Daily repro cleanup
|
||||
Description=Daily rebuilderd-worker chroot and cache cleanup
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
|
|
Loading…
Reference in New Issue