Reimplement repo_add as db_modify and clean code accordingly

This commit is contained in:
Eric Torres
2019-02-20 15:22:18 -08:00
parent 99492bbb4a
commit 387c5f7d33
3 changed files with 42 additions and 73 deletions

View File

@ -89,13 +89,10 @@ if __name__ == '__main__':
directory=cachedir,
signatures_only=True)
for pkg_tarball in pkg_tarballs:
del_pkgfile(pkg_tarball)
for pkgfile in (*pkg_tarballs, *sigfiles):
del_pkgfile(pkgfile)
for sigfile in sigfiles:
del_pkgfile(sigfile)
try:
repos.repo_add('remove', db, pkg, opts=opts)
except repos.RepoAddError as e:
syslog.error(e)
try:
repos.db_modify('remove', db, *opts, *pkgs)
except repos.RepoAddError as e:
syslog.error(e)