From ea42871eda2c333984cc8d7f1c232254a292a062 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Fri, 24 Dec 2021 08:28:00 -0300 Subject: [PATCH] [arch] improvement: letting the AUR's API perform the semantic search --- CHANGELOG.md | 6 +++++- bauh/gems/arch/controller.py | 9 +-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 594f8e1a..3c9ff947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [0.9.25] ### Improvements -- `--reset`: cleaning the temporary files as well (`/tmp/bauh@$USER`) +- General + - `--reset`: cleaning the temporary files as well (`/tmp/bauh@$USER`) + +- Arch + - AUR: letting the API perform the semantic search ### Fixes - AppImage package diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index 635ce949..5c67fdd9 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -217,12 +217,6 @@ class ArchManager(SoftwareManager): self.disk_cache_updater = disk_cache_updater self.pkgbuilder_user: Optional[str] = f'{__app_name__}-aur' if context.root_user else None - @staticmethod - def get_aur_semantic_search_map() -> Dict[str, str]: - return {'google chrome': 'google-chrome', - 'chrome google': 'google-chrome', - 'googlechrome': 'google-chrome'} - def refresh_mirrors(self, root_password: str, watcher: ProcessWatcher) -> bool: handler = ProcessHandler(watcher) @@ -377,8 +371,7 @@ class ArchManager(SoftwareManager): search_threads.append(t) if aur_supported: - aur_query = self.get_aur_semantic_search_map().get(words, words) - taur = Thread(target=self._fill_aur_search_results, args=(aur_query, search_output), daemon=True) + taur = Thread(target=self._fill_aur_search_results, args=(words, search_output), daemon=True) taur.start() search_threads.append(taur)