From cc5649cfb245fa08fc4611659137c3e5b0ab8098 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 6 May 2022 16:25:54 +0200 Subject: [PATCH] [fix] Allow lime2 to upgrade even if kernel is hold (#1452) * [fix] Allow lime2 to upgrade even if kernel is hold * [fix] Bad set operation --- .../data_migrations/0021_migrate_to_bullseye.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index e8ed6bc4d..6b08f5792 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -302,7 +302,19 @@ class MyMigration(Migration): if os.path.exists("/etc/apt/sources.list") and " bullseye " not in read_file("/etc/apt/sources.list"): tools_update(target="system") upgradable_system_packages = list(_list_upgradable_apt_packages()) - if upgradable_system_packages: + upgradable_system_packages = [package["name"] for package in upgradable_system_packages] + upgradable_system_packages = set(upgradable_system_packages) + # Lime2 have hold packages to avoid ethernet instability + # See https://github.com/YunoHost/arm-images/commit/b4ef8c99554fd1a122a306db7abacc4e2f2942df + lime2_hold_packages = set([ + "armbian-firmware", + "armbian-bsp-cli-lime2", + "linux-dtb-current-sunxi", + "linux-image-current-sunxi", + "linux-u-boot-lime2-current", + "linux-image-next-sunxi" + ]) + if upgradable_system_packages - lime2_hold_packages: raise YunohostError("migration_0021_system_not_fully_up_to_date") @property