diff --git a/src/tools.py b/src/tools.py index ec90361fc..5ec556012 100644 --- a/src/tools.py +++ b/src/tools.py @@ -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")