From 8b56983171033b8da1363c04a7956cd4f102b222 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 27 Jul 2024 15:09:48 +0200 Subject: [PATCH] bullseye->bookworm: explicitly validate that we're on yunohost 12.x at the end of the migration --- src/migrations/0027_migrate_to_bookworm.py.disabled | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 69c9812b3..46bde6e25 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -267,6 +267,9 @@ class MyMigration(Migration): # For some reason subprocess doesn't like the redirections so we have to use bash -c explicity... subprocess.check_call(["bash", "-c", cmd]) + if self.yunohost_major_version() != N_CURRENT_YUNOHOST + 1: + raise YunohostError("Still on YunoHost 11.x at the end of the migration, eh? Sounds like the migration didn't really complete!?", raw_msg=True) + def debian_major_version(self): # The python module "platform" and lsb_release are not reliable because # on some setup, they may still return Release=9 even after upgrading to