mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 05:04:15 +02:00
[appimage] fix: uninstalling the application when download fails (dowgrading)
This commit is contained in:
@@ -12,7 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
|
|
||||||
- AppImage
|
- AppImage
|
||||||
- displaying updates without the associated download URL for some applications [#207](https://github.com/vinifmor/bauh/issues/207)
|
- 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
|
- Flatpak
|
||||||
- not displaying update components not associated with installed packages
|
- not displaying update components not associated with installed packages
|
||||||
|
|||||||
@@ -333,12 +333,18 @@ class AppImageManager(SoftwareManager):
|
|||||||
type_=MessageType.ERROR)
|
type_=MessageType.ERROR)
|
||||||
return False
|
return False
|
||||||
else:
|
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:
|
if self.uninstall(pkg, root_password, watcher).success:
|
||||||
old_release = versions.history[versions.pkg_status_idx + 1]
|
if self._install(pkg=pkg, watcher=watcher, pre_downloaded_file=download_data).success:
|
||||||
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:
|
|
||||||
self.cache_to_disk(pkg, None, False)
|
self.cache_to_disk(pkg, None, False)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user