From fb8229e1ac1b0486a460585990d1c6d146d22286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Moreira?= Date: Tue, 11 Feb 2020 17:15:20 -0300 Subject: [PATCH] [aur] renaming settings's property 'pacman_dep_check' to 'simple_checking' --- CHANGELOG.md | 2 +- README.md | 6 ++++-- bauh/gems/arch/config.py | 2 +- bauh/gems/arch/controller.py | 18 +++++++++--------- bauh/gems/arch/resources/locale/ca | 4 ++-- bauh/gems/arch/resources/locale/de | 4 ++-- bauh/gems/arch/resources/locale/en | 4 ++-- bauh/gems/arch/resources/locale/es | 4 ++-- bauh/gems/arch/resources/locale/it | 4 ++-- bauh/gems/arch/resources/locale/pt | 4 ++-- 10 files changed, 27 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23695e85..5f0f0ff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - now every package manager must provide the best upgrade order for all the selected packages ( can be disabled through the settings file **~/.config/bauh/config.yml** or the UI ) - AUR - allowing the user to bypass checksum errors when installing / upgrading / downgrading packages - - improved the way missing dependencies are verified when installing a new package ( the old way was not identifying some missing dependencies of **anbox-git**). It is possible to use the old algorithm ( only pacman-based ) by setting **pacman_dep_check** to **true** in **~/.config/bauh/arch.yml** + - improved how missing dependencies are checked when installing a new package ( the old way was not identifying some missing dependencies of **anbox-git** ). It is possible to use the old algorithm by setting **simple_checking** to **true** in **~/.config/bauh/arch.yml**. More information at [README](https://github.com/vinifmor/bauh/#aur--arch-). - UI: - **Settings** available as a tray action as well - minor improvements diff --git a/README.md b/README.md index ed2900fd..dc06ea77 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,8 @@ db_updater: the number of your machine processors (**-j${nproc}**). b) same as previous, but related to **COMPRESSXZ** definition ( if '--threads=0' is not defined ) + + c) **ccache** will be added to **BUILDENV** if it is installed on the system and already not defined Obs: For more information about them, have a look at [Makepkg](https://wiki.archlinux.org/index.php/Makepkg) - During bauh initialization a full AUR normalized index is saved at **/tmp/bauh/arch/aur.txt**, and it will only be used if the AUR API cannot handle the number of matches for a given query. @@ -162,9 +164,9 @@ db_updater: - The configuration file is located at **~/.config/bauh/arch.yml** and it allows the following customizations: ``` optimize: true # if 'false': disables the auto-compilation improvements -transitive_checking: true # if 'false': the dependency checking process will be faster, but the application will ask for a confirmation every time a not installed dependency is detected. +transitive_checking: true # this property defines if dependencies of a dependency should be retrieved before the package installation. It avoids interruptions, since it will detect all required dependencies before the process begin. sync_databases: true # package databases synchronization once a day ( or every device reboot ) before the first package installation / upgrade / downgrade -pacman_dep_check: false # this peroperty defines how missing dependencies checking should be performed. When 'false' a robust algorithm will be used, otherwise ('true') just a simple pacman check will be performed. +simple_checking: false # this property defines how the missing dependencies checking process should be done before installing a package. When set to 'false' an algorithm combining pacman's methods and AUR's API is used ( currently slower, but more accurate ), whereas 'false' relies only on pacman's methods ( faster. but currently not always accurate ) ``` - Required dependencies: - **pacman** diff --git a/bauh/gems/arch/config.py b/bauh/gems/arch/config.py index 8096737f..31cad670 100644 --- a/bauh/gems/arch/config.py +++ b/bauh/gems/arch/config.py @@ -3,5 +3,5 @@ from bauh.gems.arch import CONFIG_FILE def read_config(update_file: bool = False) -> dict: - template = {'optimize': True, 'transitive_checking': True, "sync_databases": True, "pacman_dep_check": False} + template = {'optimize': True, 'transitive_checking': True, "sync_databases": True, "simple_checking": False} return read(CONFIG_FILE, template, update_file=update_file) diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index a33cfb7c..af854719 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -583,7 +583,7 @@ class ArchManager(SoftwareManager): def _handle_deps_and_keys(self, pkgname: str, root_password: str, handler: ProcessHandler, pkgdir: str, check_subdeps: bool = True) -> bool: handler.watcher.change_substatus(self.i18n['arch.checking.deps'].format(bold(pkgname))) - if not self.local_config['pacman_dep_check']: + if not self.local_config['simple_checking']: ti = time.time() with open('{}/.SRCINFO'.format(pkgdir)) as f: srcinfo = aur.map_srcinfo(f.read()) @@ -615,7 +615,7 @@ class ArchManager(SoftwareManager): return self._handle_deps_and_keys(pkgname, root_password, handler, pkgdir, check_subdeps=False) ti = time.time() - check_res = makepkg.check(pkgdir, optimize=self.local_config['optimize'], missing_deps=self.local_config['pacman_dep_check'], handler=handler) + check_res = makepkg.check(pkgdir, optimize=self.local_config['optimize'], missing_deps=self.local_config['simple_checking'], handler=handler) if check_res: if check_res.get('missing_deps'): @@ -1034,12 +1034,12 @@ class ArchManager(SoftwareManager): tooltip_key='arch.config.optimize.tip', value=bool(config['optimize']), max_width=max_width), - self._gen_bool_selector(id_='pacman_check', - label_key='arch.config.pacman_check', - tooltip_key='arch.config.pacman_check.tip', - value=not bool(config['pacman_dep_check']), + self._gen_bool_selector(id_='simple_dep_check', + label_key='arch.config.simple_dep_check', + tooltip_key='arch.config.simple_dep_check.tip', + value=bool(config['simple_checking']), max_width=max_width), - self._gen_bool_selector(id_='dep_check', + self._gen_bool_selector(id_='trans_dep_check', label_key='arch.config.trans_dep_check', tooltip_key='arch.config.trans_dep_check.tip', value=bool(config['transitive_checking']), @@ -1058,9 +1058,9 @@ class ArchManager(SoftwareManager): form_install = component.components[0] config['optimize'] = form_install.get_component('opts').get_selected() - config['transitive_checking'] = form_install.get_component('dep_check').get_selected() + config['transitive_checking'] = form_install.get_component('trans_dep_check').get_selected() config['sync_databases'] = form_install.get_component('sync_dbs').get_selected() - config['pacman_dep_check'] = not form_install.get_component('pacman_check').get_selected() + config['simple_checking'] = form_install.get_component('simple_dep_check').get_selected() try: save_config(config, CONFIG_FILE) diff --git a/bauh/gems/arch/resources/locale/ca b/bauh/gems/arch/resources/locale/ca index 1ca9c500..6ca50944 100644 --- a/bauh/gems/arch/resources/locale/ca +++ b/bauh/gems/arch/resources/locale/ca @@ -111,5 +111,5 @@ arch.sync_databases.substatus=Synchronizing package databases arch.sync_databases.substatus.error=It was not possible to synchronize the package database arch.config.sync_dbs=Synchronize packages databases arch.config.sync_dbs.tip=Synchronizes the package databases once a day ( or after a device reboot ) before the first package installation, upgrade or downgrade. This option help to prevent errors during these operations. -arch.config.pacman_check=Robust dependency checking -arch.config.pacman_check.tip=Whether a more robust dependencies checking should be performed before installing a package. If disabled, only the one provided by pacman will be used. \ No newline at end of file +arch.config.simple_dep_check=Verificació de dependències simples +arch.config.simple_dep_check.tip=Si només s'hauria d'utilitzar la verificació de dependència proporcionada per pacman abans d'instal·lar un paquet (més ràpid, però no sempre exacte). Si està desactivat, es farà una comprovació més completa (més lenta, però més precisa) \ No newline at end of file diff --git a/bauh/gems/arch/resources/locale/de b/bauh/gems/arch/resources/locale/de index 82d66023..4b377f9c 100644 --- a/bauh/gems/arch/resources/locale/de +++ b/bauh/gems/arch/resources/locale/de @@ -111,5 +111,5 @@ arch.sync_databases.substatus=Synchronizing package databases arch.sync_databases.substatus.error=It was not possible to synchronize the package database arch.config.sync_dbs=Synchronize packages databases arch.config.sync_dbs.tip=Synchronizes the package databases once a day ( or after a device reboot ) before the first package installation, upgrade or downgrade. This option help to prevent errors during these operations. -arch.config.pacman_check=Robust dependency checking -arch.config.pacman_check.tip=Whether a more robust dependencies checking should be performed before installing a package. If disabled, only the one provided by pacman will be used. \ No newline at end of file +arch.config.simple_dep_check=Simple dependencies checking +arch.config.simple_dep_check.tip=If only the dependency checking provided by pacman should be used before installing a package ( faster, but not always accurate ). If disabled, a more complete checking will be performed ( slower, but more accurate ) \ No newline at end of file diff --git a/bauh/gems/arch/resources/locale/en b/bauh/gems/arch/resources/locale/en index daed8f46..744a0ba2 100644 --- a/bauh/gems/arch/resources/locale/en +++ b/bauh/gems/arch/resources/locale/en @@ -111,5 +111,5 @@ arch.sync_databases.substatus=Synchronizing package databases arch.sync_databases.substatus.error=It was not possible to synchronize the package database arch.config.sync_dbs=Synchronize packages databases arch.config.sync_dbs.tip=Synchronizes the package databases once a day ( or after a device reboot ) before the first package installation, upgrade or downgrade. This option help to prevent errors during these operations. -arch.config.pacman_check=Robust dependency checking -arch.config.pacman_check.tip=Whether a more robust dependencies checking should be performed before installing a package. If disabled, only the one provided by pacman will be used. \ No newline at end of file +arch.config.simple_dep_check=Simple dependencies checking +arch.config.simple_dep_check.tip=If only the dependency checking provided by pacman should be used before installing a package ( faster, but not always accurate ). If disabled, a more complete checking will be performed ( slower, but more accurate ) \ No newline at end of file diff --git a/bauh/gems/arch/resources/locale/es b/bauh/gems/arch/resources/locale/es index d1aa1734..0ed21a13 100644 --- a/bauh/gems/arch/resources/locale/es +++ b/bauh/gems/arch/resources/locale/es @@ -111,5 +111,5 @@ arch.sync_databases.substatus=Sincronizando bases de paquetes arch.sync_databases.substatus.error=No fue posible sincronizar la base de paquetes arch.config.sync_dbs=Sincronizar las bases de paquetes arch.config.sync_dbs.tip=Sincroniza las bases de paquetes una vez al día ( o cada reinicialización del dispositivo ) antes de la primera instalación, actualización o reversión de un paquete. Esta opción ayuda a prevenir errores durante estas operaciones. -arch.config.pacman_check=Verificación de dependencia robusta -arch.config.pacman_check.tip=Si se debe realizar una verificación de dependencias más sólida antes de instalar un paquete. Si desactivada, solo se utilizará la proporcionada por pacman. \ No newline at end of file +arch.config.simple_dep_check=Verificación de dependencias simples +arch.config.simple_dep_check.tip=Si solo se usara la verificación de dependencia provista por pacman antes de instalar un paquete (más rápido, pero no siempre exacto). Si está deshabilitado, se realizará una verificación más completa (más lenta, pero más precisa) \ No newline at end of file diff --git a/bauh/gems/arch/resources/locale/it b/bauh/gems/arch/resources/locale/it index 53c8c880..a6314c23 100644 --- a/bauh/gems/arch/resources/locale/it +++ b/bauh/gems/arch/resources/locale/it @@ -79,5 +79,5 @@ arch.sync_databases.substatus=Synchronizing package databases arch.sync_databases.substatus.error=It was not possible to synchronize the package database arch.config.sync_dbs=Synchronize packages databases arch.config.sync_dbs.tip=Synchronizes the package databases once a day ( or after a device reboot ) before the first package installation, upgrade or downgrade. This option help to prevent errors during these operations. -arch.config.pacman_check=Robust dependency checking -arch.config.pacman_check.tip=Whether a more robust dependencies checking should be performed before installing a package. If disabled, only the one provided by pacman will be used. \ No newline at end of file +arch.config.simple_dep_check=Verifica delle dipendenze semplice +arch.config.simple_dep_check.tip=Se è necessario utilizzare solo la verifica della dipendenza fornita da pacman prima di installare un pacchetto (più veloce, ma non sempre accurato). Se disabilitato, verrà eseguito un controllo più completo (più lento, ma più accurato) \ No newline at end of file diff --git a/bauh/gems/arch/resources/locale/pt b/bauh/gems/arch/resources/locale/pt index e87a54cb..d2302470 100644 --- a/bauh/gems/arch/resources/locale/pt +++ b/bauh/gems/arch/resources/locale/pt @@ -111,5 +111,5 @@ arch.sync_databases.substatus=Sincronizando bases de pacotes arch.sync_databases.substatus.error=Não foi possível sincronizar as bases de pacotes arch.config.sync_dbs=Sincronizar bases de pacotes arch.config.sync_dbs.tip=Sincroniza as bases de pacotes uma vez ao dia ( ou a cada reinicialização do dispositivo ) antes da primeira instalação, atualização ou reversão de um pacote. Essa opção ajuda a evitar erros durante essa operações. -arch.config.pacman_check=Verificação de dependências robusta -arch.config.pacman_check.tip=Se uma verificação de dependências mais robusta deve ser realizada antes da instalação de um pacote. Caso desabilitada, somente a provida pelo pacman será utilizada. +arch.config.simple_dep_check=Verificação de dependências simples +arch.config.simple_dep_check.tip=Se somente a verificação de dependências provida pelo pacman deve ser usada antes de instalar um pacote ( mais rápida, porém nem sempre precisa ). Se desativada, uma verificação mais completa será realizada ( mais lenta, porém mais precisa )