From d912eb3aefe2798bd0395dbc19128a27f9db420c Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Tue, 12 Jan 2021 11:44:47 -0300 Subject: [PATCH] [arch] fix -> calling pacman to read installed packages when 'Repositories' and 'AUR' properties are set to 'false' --- CHANGELOG.md | 2 +- bauh/gems/arch/controller.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5a53738..bf1b9f40 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/). - Arch - crashing when information of a given package is not available - displaying "provided" repository packages on the search results (e.g: **nvidia** would appear as a package) - + - calling pacman to read installed packages when "Repositories" and "AUR" properties are set to "false" (it would not display the packages, but the call was unnecessary being done) - UI - displaying a popup when information of a given package is not available diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index 0ef1e44c..4101ccdc 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -558,13 +558,16 @@ class ArchManager(SoftwareManager): self.aur_client.clean_caches() arch_config = self.configman.get_config() - aur_supported = aur.is_supported(arch_config) + aur_supported, repos_supported = aur.is_supported(arch_config), arch_config['repositories'] + + if not aur_supported and not repos_supported: + return SearchResult.empty() installed = pacman.map_installed(names=names) aur_pkgs, repo_pkgs = None, None - if arch_config['repositories'] and installed['signed']: + if repos_supported and installed['signed']: repo_pkgs = installed['signed'] if installed['not_signed']: