mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
bullseye->bookworm: add a trick to flag the migration as done if it's still marked as pending
This commit is contained in:
parent
eb1d715764
commit
0503a38a74
1 changed files with 9 additions and 0 deletions
|
@ -671,6 +671,15 @@ def tools_migrations_run(
|
|||
|
||||
raise YunohostValidationError("migrations_no_such_migration", id=target)
|
||||
|
||||
# Dirty hack to mark the bullseye->bookworm as done ...
|
||||
# it may still be marked as 'pending' if for some reason the migration crashed,
|
||||
# but the admins ran 'apt full-upgrade' to manually finish the migration
|
||||
# ... in which case it won't be magically flagged as 'done' until here
|
||||
migrate_to_bookworm = get_matching_migration("migrate_to_bookworm")
|
||||
if migrate_to_bookworm.state == "pending":
|
||||
migrate_to_bookworm.state = "done"
|
||||
_write_migration_state(migrate_to_bookworm.id, "done")
|
||||
|
||||
# auto, skip and force are exclusive options
|
||||
if auto + skip + force_rerun > 1:
|
||||
raise YunohostValidationError("migrations_exclusive_options")
|
||||
|
|
Loading…
Add table
Reference in a new issue