Add script for cleaning up the cache
Pungi would by default only ever add files to the cache. That would eventually result in essentially a mirror of the Koji volume. This patch adds a helper cleanup script. When called, it goes through files in the cache and deletes anything that is not hardlinked from elsewhere and with mtime not updated recently. Cleaning up files that hardlinked from some compose would not save any space anyway. The mtime check should account for cases like subpackage being downloaded but not included in any compose. This would avoid it from being downloaded over and over again. When a compose fails or is aborted, there can be a stale lock file left behind in the cache. This script cleans that up too. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
bf3e9bc53a
commit
e6d9f31ef4
2 changed files with 64 additions and 0 deletions
1
setup.py
1
setup.py
|
|
@ -41,6 +41,7 @@ setup(
|
|||
"pungi-gather = pungi.scripts.pungi_gather:cli_main",
|
||||
"pungi-config-dump = pungi.scripts.config_dump:cli_main",
|
||||
"pungi-config-validate = pungi.scripts.config_validate:cli_main",
|
||||
"pungi-cache-cleanup = pungi.scripts.cache_cleanup:main",
|
||||
]
|
||||
},
|
||||
scripts=["contrib/yum-dnf-compare/pungi-compare-depsolving"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue