From ea52236ee8763b44f2d3fc97d7844390fa14d937 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Thu, 25 Nov 2021 14:13:04 -0300 Subject: [PATCH] [appimage] fix: not able to upgrade imported AppImage files (regression from 0.9.21) --- CHANGELOG.md | 4 +++- bauh/gems/appimage/controller.py | 13 ++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 767e421d..babd800e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - AppImage - trying to download a file without a URL associated with [#210](https://github.com/vinifmor/bauh/issues/210) - - regression: not able to import AppImage files (introduced in **0.9.21**) + - regressions: + - not able to import AppImage files (introduced in **0.9.21**) + - not able to upgrade imported AppImage files (introduced in **0.9.21**) - Arch - **wget** as a hard requirement for Arch package management diff --git a/bauh/gems/appimage/controller.py b/bauh/gems/appimage/controller.py index a553077b..a8ea581a 100644 --- a/bauh/gems/appimage/controller.py +++ b/bauh/gems/appimage/controller.py @@ -364,12 +364,15 @@ class AppImageManager(SoftwareManager): for req in requirements.to_upgrade: watcher.change_status("{} {} ({})...".format(self.i18n['manage_window.status.upgrading'], req.pkg.name, req.pkg.version)) - download_data = self._download(req.pkg, watcher) + download_data = None - if not download_data: - not_upgraded.append(req.pkg) - watcher.change_substatus('') - continue + if not req.pkg.imported: + download_data = self._download(req.pkg, watcher) + + if not download_data: + not_upgraded.append(req.pkg) + watcher.change_substatus('') + continue if not self.uninstall(req.pkg, root_password, watcher).success: not_upgraded.append(req.pkg)