[arch] improvement: letting the AUR's API perform the semantic search

This commit is contained in:
Vinicius Moreira
2021-12-24 08:28:00 -03:00
parent ba2e3c4f35
commit ea42871eda
2 changed files with 6 additions and 9 deletions

View File

@@ -6,8 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [0.9.25]
### Improvements
- General
- `--reset`: cleaning the temporary files as well (`/tmp/bauh@$USER`)
- Arch
- AUR: letting the API perform the semantic search
### Fixes
- AppImage package
- not able to reinitialize (e.g: when settings are changed)

View File

@@ -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)