bullseye->bookworm: explicitly validate that we're on yunohost 12.x at the end of the migration

This commit is contained in:
Alexandre Aubin 2024-07-27 15:09:48 +02:00
parent 2d3dddc51a
commit 8b56983171

View file

@ -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