From fb90bd26943f5314232256c4784f864f707a29bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Moreira?= Date: Mon, 11 May 2020 17:04:51 -0300 Subject: [PATCH] [fix][arch] staging regression: not considering settings related to AUR and repositories are enabled/disabled --- bauh/gems/arch/controller.py | 6 ++++-- bauh/gems/arch/worker.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index e0627549..b1e7a9d4 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -506,9 +506,11 @@ class ArchManager(SoftwareManager): if repo_pkgs is not None: repo_pkgs[pkg] = installed['not_signed'][pkg] - del installed['not_signed'][pkg] + if arch_config['aur']: + del installed['not_signed'][pkg] - aur_pkgs = installed['not_signed'] + if arch_config['aur']: + aur_pkgs = installed['not_signed'] pkgs = [] if repo_pkgs or aur_pkgs: diff --git a/bauh/gems/arch/worker.py b/bauh/gems/arch/worker.py index 7938ea04..31a5abcf 100644 --- a/bauh/gems/arch/worker.py +++ b/bauh/gems/arch/worker.py @@ -105,7 +105,7 @@ class ArchDiskCacheUpdater(Thread): self.task_man.update_progress(self.task_id, 0, self.i18n['arch.task.disk_cache.reading']) saved = 0 - pkgs = {p.name: p for p in installed if not os.path.exists(p.get_disk_cache_path())} + pkgs = {p.name: p for p in installed if ((self.aur and p.repository == 'aur') or (self.repositories and p.repository != 'aur')) and not os.path.exists(p.get_disk_cache_path())} self.to_index = len(pkgs) self.progress = self.to_index * 2