From b7d6b1b8ac4c60500a69f96db066e88b559a4951 Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Sun, 4 Sep 2022 00:28:41 +0000 Subject: [PATCH] updates.py: use a releases entry's subpath if present in automatic updates Signed-off-by: Ian Leonard --- resources/lib/modules/updates.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/lib/modules/updates.py b/resources/lib/modules/updates.py index 405fa58ce..c4353bed4 100644 --- a/resources/lib/modules/updates.py +++ b/resources/lib/modules/updates.py @@ -611,7 +611,13 @@ def get_highest_value(list): if bugfix_filename_version_bugfix > version_bugfix: update_url = release_data[f'{oe.DISTRIBUTION}-{oe.VERSION_ID}']['url'] - self.update_file = f'{update_url}{bugfix_filename}' + bugfix_filename_subpath = '' + try: + bugfix_filename_subpath = release_data[f'{oe.DISTRIBUTION}-{oe.VERSION_ID}']['project'][oe.ARCHITECTURE]['releases'][highest_device_release]['file']['subpath'] + # TODO see if presence of subpath may be assumed after LE11 releases + except KeyError: + pass + self.update_file = f'{update_url}{bugfix_filename_subpath}/{bugfix_filename}' log.log(f'Found update file: {self.update_file}', log.INFO) # show update available notification