[aur] showing a popup when there are integrity issues with the source-files of a building package

This commit is contained in:
Vinicius Moreira
2019-10-21 18:48:48 -03:00
parent 887c62f878
commit d80cac19af
6 changed files with 21 additions and 3 deletions

View File

@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [0.7.1] 2019- ## [0.7.1] 2019-
### Improvements
- AUR:
- showing a "user-friendly" popup when there are integrity issues with the source-files of a building package
### Fixes ### Fixes
- AUR: - AUR:
- update-checking for some scenarios - update-checking for some scenarios

View File

@@ -490,6 +490,12 @@ class ArchManager(SoftwareManager):
handler.watcher.print(self.i18n['action.cancelled']) handler.watcher.print(self.i18n['action.cancelled'])
return False return False
if check_res.get('validity_check'):
handler.watcher.show_message(title=self.i18n['arch.aur.install.validity_check.title'],
body=self.i18n['arch.aur.install.validity_check.body'].format(bold(pkgname)),
type_=MessageType.ERROR)
return False
return True return True
def _install_optdeps(self, pkgname: str, root_password: str, handler: ProcessHandler, pkgdir: str, change_progress: bool = True) -> bool: def _install_optdeps(self, pkgname: str, root_password: str, handler: ProcessHandler, pkgdir: str, change_progress: bool = True) -> bool:

View File

@@ -18,4 +18,7 @@ def check(pkgdir: str, handler: ProcessHandler) -> dict:
if gpg_keys: if gpg_keys:
res['gpg_key'] = gpg_keys[0] res['gpg_key'] = gpg_keys[0]
if 'One or more files did not pass the validity check' in output:
res['validity_check'] = True
return res return res

View File

@@ -60,4 +60,6 @@ arch.aur.install.pgp.receive_fail=Could not receive PGP key {}
arch.aur.install.unknown_key.title=Public key required arch.aur.install.unknown_key.title=Public key required
arch.install.aur.unknown_key.body=To continue {} installation is necessary to trust the following public key {} arch.install.aur.unknown_key.body=To continue {} installation is necessary to trust the following public key {}
arch.aur.install.unknown_key.status=Receiving public key {} arch.aur.install.unknown_key.status=Receiving public key {}
arch.aur.install.unknown_key.receive_error=Could not receive public key {} arch.aur.install.unknown_key.receive_error=Could not receive public key {}
arch.aur.install.validity_check.title=Integrity issues
arch.aur.install.validity_check.body=Some of the source-files needed for {} installation are not healthy. The installation will be cancelled to avoid damages to your system.

View File

@@ -92,4 +92,6 @@ arch.aur.install.pgp.sign_fail=No fue posible recibir la clave PGP {}
arch.aur.install.unknown_key.title=Clave pública necesaria arch.aur.install.unknown_key.title=Clave pública necesaria
arch.aur.install.unknown_key.status=Recibiendo la clave pública {} arch.aur.install.unknown_key.status=Recibiendo la clave pública {}
arch.aur.install.unknown_key.receive_error=No fue posible recibir la clave pública {} arch.aur.install.unknown_key.receive_error=No fue posible recibir la clave pública {}
arch.install.aur.unknown_key.body=Para continuar la instalación de {} es necesario confiar en la siguiente clave pública {} arch.install.aur.unknown_key.body=Para continuar la instalación de {} es necesario confiar en la siguiente clave pública {}
arch.aur.install.validity_check.title=Problemas de integridad
arch.aur.install.validity_check.body=Algunos de los archivos fuente necesarios para la instalación de {} no están en buen estado. La instalación se cancelará para evitar daños a su sistema.

View File

@@ -92,4 +92,6 @@ arch.aur.install.pgp.receive_fail=Não foi possível receber a chave PGP {}
arch.aur.install.unknown_key.title=Chave pública necessária arch.aur.install.unknown_key.title=Chave pública necessária
arch.install.aur.unknown_key.body=Para continuar a instalação de {} é ncessário confiar na seguinte chave pública {} arch.install.aur.unknown_key.body=Para continuar a instalação de {} é ncessário confiar na seguinte chave pública {}
arch.aur.install.unknown_key.status=Recebendo a chave pública {} arch.aur.install.unknown_key.status=Recebendo a chave pública {}
arch.aur.install.unknown_key.receive_error=Não fui possível receber a chave pública {} arch.aur.install.unknown_key.receive_error=Não fui possível receber a chave pública {}
arch.aur.install.validity_check.title=Problemas de integridade
arch.aur.install.validity_check.body=Alguns dos arquivos-fonte necessários para instalação de {} não estão íntegros. A instalação será cancelada para evitar danos no seu sistema.