mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
housekeep: stop "pkgmaint" script (cron job)
With the removal of the "setup-repo" command this script becomes obsolete, because it is not possible to reserve a repo anymore. Hence we don't need cleanup. We've also seen issues in case the last packager's user account is removed, leading to the deletion of a Package. Let's deactivate this for now. Issue report: #425 Signed-off-by: moson-mo <mo-son@mailbox.org>
This commit is contained in:
parent
b1a9efd552
commit
8d2e176c2f
2 changed files with 15 additions and 4 deletions
|
@ -17,6 +17,12 @@ def _main():
|
|||
|
||||
|
||||
def main():
|
||||
# Previously used to clean up "reserved" packages which never got pushed.
|
||||
# Let's deactivate this for now since "setup-repo" is gone and we see
|
||||
# other issue where deletion of a user account might cause unintended
|
||||
# removal of a package (where PackagerUID account was deleted)
|
||||
return
|
||||
|
||||
db.get_engine()
|
||||
with db.begin():
|
||||
_main()
|
||||
|
|
|
@ -62,7 +62,12 @@ def test_pkgmaint(packages: list[Package]):
|
|||
# Query package objects again and assert that the
|
||||
# first package was deleted but all others are intact.
|
||||
packages = db.query(Package).all()
|
||||
assert len(packages) == 4
|
||||
expected = ["pkg_1", "pkg_2", "pkg_3", "pkg_4"]
|
||||
for i, pkgname in enumerate(expected):
|
||||
assert packages[i].Name == pkgname
|
||||
|
||||
# !Cleanup of packages without last packager deactivated.
|
||||
# We should still have 5 packages
|
||||
assert len(packages) == 5
|
||||
|
||||
# assert len(packages) == 4
|
||||
# expected = ["pkg_1", "pkg_2", "pkg_3", "pkg_4"]
|
||||
# for i, pkgname in enumerate(expected):
|
||||
# assert packages[i].Name == pkgname
|
||||
|
|
Loading…
Add table
Reference in a new issue