From b928dd12227e18f4106b74ee36559db73e23d184 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 27 Apr 2022 16:25:14 +0200 Subject: [PATCH 1/2] migrate_to_bullseye: /etc/apt/sources.list may not exist --- src/yunohost/data_migrations/0021_migrate_to_bullseye.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 77797c63f..e8ed6bc4d 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -299,7 +299,7 @@ class MyMigration(Migration): # Check system is up to date # (but we don't if 'bullseye' is already in the sources.list ... # which means maybe a previous upgrade crashed and we're re-running it) - if " bullseye " not in read_file("/etc/apt/sources.list"): + 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: @@ -355,7 +355,8 @@ class MyMigration(Migration): def patch_apt_sources_list(self): sources_list = glob.glob("/etc/apt/sources.list.d/*.list") - sources_list.append("/etc/apt/sources.list") + if os.path.exists("/etc/apt/sources.list"): + sources_list.append("/etc/apt/sources.list") # This : # - replace single 'buster' occurence by 'bulleye' From cc5649cfb245fa08fc4611659137c3e5b0ab8098 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 6 May 2022 16:25:54 +0200 Subject: [PATCH 2/2] [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