diff --git a/CHANGELOG.md b/CHANGELOG.md index cd3712c1..36dfd201 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - AppImage - displaying updates without the associated download URL for some applications [#207](https://github.com/vinifmor/bauh/issues/207) - - uninstalling the application when an update download fails [#207](https://github.com/vinifmor/bauh/issues/207) + - uninstalling the application when an update/downgrade download fails [#207](https://github.com/vinifmor/bauh/issues/207) - Flatpak - not displaying update components not associated with installed packages diff --git a/bauh/gems/appimage/controller.py b/bauh/gems/appimage/controller.py index 669acb6d..94c4f8d1 100644 --- a/bauh/gems/appimage/controller.py +++ b/bauh/gems/appimage/controller.py @@ -333,12 +333,18 @@ class AppImageManager(SoftwareManager): type_=MessageType.ERROR) return False else: + old_release = versions.history[versions.pkg_status_idx + 1] + pkg.version = old_release['0_version'] + pkg.latest_version = pkg.version + pkg.url_download = old_release['2_url_download'] + + download_data = self._download(pkg=pkg, watcher=watcher) + + if not download_data: + return False + if self.uninstall(pkg, root_password, watcher).success: - old_release = versions.history[versions.pkg_status_idx + 1] - pkg.version = old_release['0_version'] - pkg.latest_version = pkg.version - pkg.url_download = old_release['2_url_download'] - if self.install(pkg, root_password, None, watcher).success: + if self._install(pkg=pkg, watcher=watcher, pre_downloaded_file=download_data).success: self.cache_to_disk(pkg, None, False) return True else: