mirror of
https://github.com/archlinux-jerry/buildbot
synced 2024-11-22 13:00:40 +08:00
repo.py: pathlib is pain in the ass
This commit is contained in:
parent
92af54fba4
commit
57d26ac8e8
1 changed files with 2 additions and 1 deletions
3
repo.py
3
repo.py
|
@ -80,7 +80,8 @@ def repo_remove(fpaths):
|
||||||
for fpath in fpaths:
|
for fpath in fpaths:
|
||||||
throw_away(fpath)
|
throw_away(fpath)
|
||||||
sigpath = fpath.parent / f'{str(fpath.name)}.sig'
|
sigpath = fpath.parent / f'{str(fpath.name)}.sig'
|
||||||
if sigpath.exists():
|
# there is a fscking problem that fscking pathlib always follow symlinks
|
||||||
|
if sigpath.exists() or sigpath.is_symlink():
|
||||||
throw_away(sigpath)
|
throw_away(sigpath)
|
||||||
pkgnames = [get_pkg_details_from_name(fpath.name).pkgname for fpath in fpaths]
|
pkgnames = [get_pkg_details_from_name(fpath.name).pkgname for fpath in fpaths]
|
||||||
return bash(f'{REPO_REMOVE_CMD} {dbpath} {" ".join(pkgnames)}', RUN_CMD_TIMEOUT=5*60)
|
return bash(f'{REPO_REMOVE_CMD} {dbpath} {" ".join(pkgnames)}', RUN_CMD_TIMEOUT=5*60)
|
||||||
|
|
Loading…
Reference in a new issue