[appimage] showing an error popup when AppImageLauncher messes up with an application installation

This commit is contained in:
Vinicius Moreira
2019-10-22 13:20:31 -03:00
parent 52f313032b
commit 9b17407067
5 changed files with 18 additions and 5 deletions

View File

@@ -11,6 +11,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Improvements ### Improvements
- 3 password attempts for root authentication - 3 password attempts for root authentication
- AppImage:
- showing an error popup when **AppImageLauncher** messes up with an application installation
- AUR: - AUR:
- showing a "user-friendly" popup when there are integrity issues with the source-files of a building package - showing a "user-friendly" popup when there are integrity issues with the source-files of a building package

View File

@@ -17,7 +17,7 @@ from bauh.api.abstract.model import SoftwarePackage, PackageHistory, PackageUpda
from bauh.api.abstract.view import MessageType from bauh.api.abstract.view import MessageType
from bauh.api.constants import HOME_PATH from bauh.api.constants import HOME_PATH
from bauh.commons.html import bold from bauh.commons.html import bold
from bauh.commons.system import SystemProcess, new_subprocess, ProcessHandler, run_cmd from bauh.commons.system import SystemProcess, new_subprocess, ProcessHandler, run_cmd, SimpleProcess
from bauh.gems.appimage import query, INSTALLATION_PATH, suggestions, db from bauh.gems.appimage import query, INSTALLATION_PATH, suggestions, db
from bauh.gems.appimage.model import AppImage from bauh.gems.appimage.model import AppImage
from bauh.gems.appimage.worker import DatabaseUpdater from bauh.gems.appimage.worker import DatabaseUpdater
@@ -298,12 +298,20 @@ class AppImageManager(SoftwareManager):
watcher.change_substatus(self.i18n['appimage.install.extract'].format(bold(file_name))) watcher.change_substatus(self.i18n['appimage.install.extract'].format(bold(file_name)))
try: try:
handler.handle(SystemProcess(new_subprocess([file_path, '--appimage-extract'], cwd=out_dir))) res, output = handler.handle_simple(SimpleProcess([file_path, '--appimage-extract'], cwd=out_dir))
if 'Error: Failed to register AppImage in AppImageLauncherFS' in output:
watcher.show_message(title=self.i18n['error'],
body=self.i18n['appimage.install.appimagelauncher.error'].format(appimgl=bold('AppImageLauncher'), app=bold(pkg.name)),
type_=MessageType.ERROR)
handler.handle(SystemProcess(new_subprocess(['rm', '-rf', out_dir])))
return False
except: except:
watcher.show_message(title=self.i18n['error'], watcher.show_message(title=self.i18n['error'],
body=traceback.format_exc(), body=traceback.format_exc(),
type_=MessageType.ERROR) type_=MessageType.ERROR)
traceback.print_exc() traceback.print_exc()
handler.handle(SystemProcess(new_subprocess(['rm', '-rf', out_dir])))
return False return False
watcher.change_substatus(self.i18n['appimage.install.desktop_entry']) watcher.change_substatus(self.i18n['appimage.install.desktop_entry'])

View File

@@ -15,4 +15,5 @@ appimage.downgrade.unknown_version.body=It was not possible to identify {} curre
appimage.downgrade.first_version={} is in its first published version appimage.downgrade.first_version={} is in its first published version
appimage.error.uninstall_current_version=It was not possible to uninstall the current version of {} appimage.error.uninstall_current_version=It was not possible to uninstall the current version of {}
appimage.downgrade.install_version=It was not possible to install the version {} ({}) appimage.downgrade.install_version=It was not possible to install the version {} ({})
appimage.install.download.error=It was not possible to download the file {}. The file server can be down. appimage.install.download.error=It was not possible to download the file {}. The file server can be down.
appimage.install.appimagelauncher.error={appimgl} is not allowing {app} to be installed. Uninstall {appimgl}, reboot your system and try to install {app} again.

View File

@@ -15,4 +15,5 @@ appimage.downgrade.unknown_version.body=No fue posible identificar la versión a
appimage.downgrade.first_version={} está en su primera versión publicada appimage.downgrade.first_version={} está en su primera versión publicada
appimage.downgrade.uninstall_current_version=No fue posible desinstalar la versión actual de {} appimage.downgrade.uninstall_current_version=No fue posible desinstalar la versión actual de {}
appimage.downgrade.install_version=No fue posible instalar la versión {} ({}) appimage.downgrade.install_version=No fue posible instalar la versión {} ({})
appimage.install.download.error=No fue posible descargar el archivo {}. El servidor del archivo puede estar inactivo. appimage.install.download.error=No fue posible descargar el archivo {}. El servidor del archivo puede estar inactivo.
appimage.install.appimagelauncher.error = {appimgl} no permite la instalación de {app}. Desinstale {appimgl}, reinicie su sistema e intente instalar {app} nuevamente.

View File

@@ -15,4 +15,5 @@ appimage.downgrade.unknown_version.body=Não foi possível identificar a versão
appimage.downgrade.first_version={} se encontra em sua primeira versão publicada appimage.downgrade.first_version={} se encontra em sua primeira versão publicada
appimage.downgrade.uninstall_current_version=Não foi possível desinstalar a versão atual de {} appimage.downgrade.uninstall_current_version=Não foi possível desinstalar a versão atual de {}
appimage.downgrade.install_version=Não foi possivel instalar a versão {} ({}) appimage.downgrade.install_version=Não foi possivel instalar a versão {} ({})
appimage.install.download.error=Não foi possível baixar o arquivo {}. O servidor do arquivo pode estar fora do ar. appimage.install.download.error=Não foi possível baixar o arquivo {}. O servidor do arquivo pode estar fora do ar.
appimage.install.appimagelauncher.error={appimgl} não está permitindo que o {app} seja instalado. Desinstale o {appimgl}, reinicie o sistema e tente instalar o {app} novamente.