mirror of
https://github.com/archlinux-jerry/buildbot
synced 2024-11-21 20:40:41 +08:00
repo: remove archived packages when a pkg is removed from repo
This commit is contained in:
parent
a6f4f160b2
commit
91a7c2edfb
1 changed files with 6 additions and 0 deletions
6
repo.py
6
repo.py
|
@ -317,6 +317,12 @@ def _remove(pkgnames, target_archs=[a for a in ARCHS if a != 'any']):
|
|||
logger.info("repo-remove: %s", repo_remove(remove_pkgs))
|
||||
else:
|
||||
logger.warning(f'Nothing to remove in {arch}')
|
||||
archive_dir = Path('archive')
|
||||
for fpath in archive_dir.iterdir():
|
||||
nosigname = fpath.name[:-4] if fpath.name.endswith('.sig') else fpath.name
|
||||
if nosigname.endswith(PKG_SUFFIX) and \
|
||||
get_pkg_details_from_name(nosigname).pkgname in pkgnames:
|
||||
throw_away(fpath)
|
||||
logger.info('finished remove')
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in a new issue