mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 23:34:17 +02:00
[arch] improvement: letting the AUR's API perform the semantic search
This commit is contained in:
@@ -6,7 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
|
|
||||||
## [0.9.25]
|
## [0.9.25]
|
||||||
### Improvements
|
### 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
|
### Fixes
|
||||||
- AppImage package
|
- AppImage package
|
||||||
|
|||||||
@@ -217,12 +217,6 @@ class ArchManager(SoftwareManager):
|
|||||||
self.disk_cache_updater = disk_cache_updater
|
self.disk_cache_updater = disk_cache_updater
|
||||||
self.pkgbuilder_user: Optional[str] = f'{__app_name__}-aur' if context.root_user else None
|
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:
|
def refresh_mirrors(self, root_password: str, watcher: ProcessWatcher) -> bool:
|
||||||
handler = ProcessHandler(watcher)
|
handler = ProcessHandler(watcher)
|
||||||
|
|
||||||
@@ -377,8 +371,7 @@ class ArchManager(SoftwareManager):
|
|||||||
search_threads.append(t)
|
search_threads.append(t)
|
||||||
|
|
||||||
if aur_supported:
|
if aur_supported:
|
||||||
aur_query = self.get_aur_semantic_search_map().get(words, words)
|
taur = Thread(target=self._fill_aur_search_results, args=(words, search_output), daemon=True)
|
||||||
taur = Thread(target=self._fill_aur_search_results, args=(aur_query, search_output), daemon=True)
|
|
||||||
taur.start()
|
taur.start()
|
||||||
search_threads.append(taur)
|
search_threads.append(taur)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user