From 32658e981babffb5b7149534bd50a64d11f7c74f Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Fri, 10 May 2024 08:31:15 -0500 Subject: image-tools: T6327: drop boot console type ttyUSB --- python/vyos/system/compat.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'python/vyos/system') diff --git a/python/vyos/system/compat.py b/python/vyos/system/compat.py index 1b487c1d2..94e40d268 100644 --- a/python/vyos/system/compat.py +++ b/python/vyos/system/compat.py @@ -220,14 +220,8 @@ def get_default(data: dict, root_dir: str = '') -> Union[int, None]: sublist = list(filter(lambda x: (x.get('version') == image_name and x.get('console_type') == console_type and - x.get('console_num') == console_num and x.get('bootmode') == 'normal'), menu_entries)) - # legacy images added with legacy tools omitted 'ttyUSB'; if entry not - # available, default to initial entry of version - if not sublist: - sublist = list(filter(lambda x: x.get('version') == image_name, - menu_entries)) if sublist: return menu_entries.index(sublist[0]) @@ -268,7 +262,9 @@ def update_version_list(root_dir: str = '') -> list[dict]: add = list(set(current_versions) - set(menu_versions)) for ver in add: last = menu_entries[0].get('version') - new = deepcopy(list(filter(lambda x: x.get('version') == last, + # copy legacy format of menu entries; ignore deprecated ttyUSB + new = deepcopy(list(filter(lambda x: (x.get('version') == last and + x.get('console_type') != 'ttyUSB'), menu_entries))) for e in new: boot_opts = grub.get_boot_opts(ver) -- cgit v1.2.3