mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Unused vars, black
This commit is contained in:
parent
fa207ebaff
commit
7403d4679f
1 changed files with 25 additions and 23 deletions
|
@ -27,9 +27,6 @@ logger = getActionLogger("yunohost.migration")
|
||||||
N_CURRENT_DEBIAN = 10
|
N_CURRENT_DEBIAN = 10
|
||||||
N_CURRENT_YUNOHOST = 4
|
N_CURRENT_YUNOHOST = 4
|
||||||
|
|
||||||
N_NEXT_DEBAN = 11
|
|
||||||
N_NEXT_YUNOHOST = 11
|
|
||||||
|
|
||||||
VENV_REQUIREMENTS_SUFFIX = ".requirements_backup_for_bullseye_upgrade.txt"
|
VENV_REQUIREMENTS_SUFFIX = ".requirements_backup_for_bullseye_upgrade.txt"
|
||||||
|
|
||||||
|
|
||||||
|
@ -308,7 +305,6 @@ class MyMigration(Migration):
|
||||||
|
|
||||||
tools_upgrade(target="system", postupgradecmds=postupgradecmds)
|
tools_upgrade(target="system", postupgradecmds=postupgradecmds)
|
||||||
|
|
||||||
|
|
||||||
def debian_major_version(self):
|
def debian_major_version(self):
|
||||||
# The python module "platform" and lsb_release are not reliable because
|
# The python module "platform" and lsb_release are not reliable because
|
||||||
# on some setup, they may still return Release=9 even after upgrading to
|
# on some setup, they may still return Release=9 even after upgrading to
|
||||||
|
@ -344,21 +340,27 @@ class MyMigration(Migration):
|
||||||
# Check system is up to date
|
# Check system is up to date
|
||||||
# (but we don't if 'bullseye' is already in the sources.list ...
|
# (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)
|
# which means maybe a previous upgrade crashed and we're re-running it)
|
||||||
if os.path.exists("/etc/apt/sources.list") and " 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")
|
tools_update(target="system")
|
||||||
upgradable_system_packages = list(_list_upgradable_apt_packages())
|
upgradable_system_packages = list(_list_upgradable_apt_packages())
|
||||||
upgradable_system_packages = [package["name"] for package in upgradable_system_packages]
|
upgradable_system_packages = [
|
||||||
|
package["name"] for package in upgradable_system_packages
|
||||||
|
]
|
||||||
upgradable_system_packages = set(upgradable_system_packages)
|
upgradable_system_packages = set(upgradable_system_packages)
|
||||||
# Lime2 have hold packages to avoid ethernet instability
|
# Lime2 have hold packages to avoid ethernet instability
|
||||||
# See https://github.com/YunoHost/arm-images/commit/b4ef8c99554fd1a122a306db7abacc4e2f2942df
|
# See https://github.com/YunoHost/arm-images/commit/b4ef8c99554fd1a122a306db7abacc4e2f2942df
|
||||||
lime2_hold_packages = set([
|
lime2_hold_packages = set(
|
||||||
|
[
|
||||||
"armbian-firmware",
|
"armbian-firmware",
|
||||||
"armbian-bsp-cli-lime2",
|
"armbian-bsp-cli-lime2",
|
||||||
"linux-dtb-current-sunxi",
|
"linux-dtb-current-sunxi",
|
||||||
"linux-image-current-sunxi",
|
"linux-image-current-sunxi",
|
||||||
"linux-u-boot-lime2-current",
|
"linux-u-boot-lime2-current",
|
||||||
"linux-image-next-sunxi"
|
"linux-image-next-sunxi",
|
||||||
])
|
]
|
||||||
|
)
|
||||||
if upgradable_system_packages - lime2_hold_packages:
|
if upgradable_system_packages - lime2_hold_packages:
|
||||||
raise YunohostError("migration_0021_system_not_fully_up_to_date")
|
raise YunohostError("migration_0021_system_not_fully_up_to_date")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue