repo.py: remove the same package instead of raising an error
This commit is contained in:
parent
d59a6cb08e
commit
73fd0f5f3f
6
repo.py
6
repo.py
|
@ -262,7 +262,11 @@ def _update(overwrite=False):
|
||||||
if nlocation.exists():
|
if nlocation.exists():
|
||||||
logger.warning(f'Overwriting {nlocation}')
|
logger.warning(f'Overwriting {nlocation}')
|
||||||
else:
|
else:
|
||||||
assert not (pkg_nlocation.exists() or sig_nlocation.exists())
|
for nlocation in (pkg_nlocation, sig_nlocation):
|
||||||
|
if nlocation.exists():
|
||||||
|
logger.warning('Same version is already in the repo.')
|
||||||
|
throw_away(pkg_to_add)
|
||||||
|
continue
|
||||||
copyfile(pkg_to_add, pkg_nlocation)
|
copyfile(pkg_to_add, pkg_nlocation)
|
||||||
copyfile(sigfile, sig_nlocation)
|
copyfile(sigfile, sig_nlocation)
|
||||||
archive_pkg(pkg_to_add)
|
archive_pkg(pkg_to_add)
|
||||||
|
|
Loading…
Reference in New Issue