diff options
author | John Estabrook <jestabro@vyos.io> | 2024-05-10 08:31:15 -0500 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-05-10 16:51:21 +0000 |
commit | 001b8207a0fbf41ecf90368c247f9145ac727422 (patch) | |
tree | e4eb61ec1734bb63150f72a8cc9a77276efa16c4 /python | |
parent | d93aedfe993a6e9868ee88803c2dc981cabdfc15 (diff) | |
download | vyos-1x-001b8207a0fbf41ecf90368c247f9145ac727422.tar.gz vyos-1x-001b8207a0fbf41ecf90368c247f9145ac727422.zip |
image-tools: T6327: drop boot console type ttyUSB
(cherry picked from commit 32658e981babffb5b7149534bd50a64d11f7c74f)
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/system/compat.py | 10 |
1 files changed, 3 insertions, 7 deletions
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) |