diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a6feb96..4a2bef4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,9 +17,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Web - handling unexpected connection errors - handling web page fetch errors + - not able to search apps by their names after being enabled on settings - UI - displaying empty categories - not scrolling the table to top after updating its content + - not calling initial required tasks after enabling a new package type on settings - minor fixes ## [0.9.5] 2020-06-07 diff --git a/bauh/gems/snap/controller.py b/bauh/gems/snap/controller.py index 5a843b13..5def1d6a 100644 --- a/bauh/gems/snap/controller.py +++ b/bauh/gems/snap/controller.py @@ -139,7 +139,7 @@ class SnapManager(SoftwareManager): return ProcessHandler(watcher).handle(SystemProcess(subproc=snap.downgrade_and_stream(pkg.name, root_password), wrong_error_phrase=None)) def upgrade(self, requirements: UpgradeRequirements, root_password: str, watcher: ProcessWatcher) -> SystemProcess: - raise Exception("'update' is not supported by {}".format(pkg.__class__.__name__)) + raise Exception("'upgrade' is not supported by {}".format(SnapManager.__class__.__name__)) def uninstall(self, pkg: SnapApplication, root_password: str, watcher: ProcessWatcher) -> bool: uninstalled = ProcessHandler(watcher).handle(SystemProcess(subproc=snap.uninstall_and_stream(pkg.name, root_password))) @@ -229,12 +229,14 @@ class SnapManager(SoftwareManager): return ProcessHandler(watcher).handle(SystemProcess(subproc=snap.refresh_and_stream(pkg.name, root_password))) def _start_category_task(self, task_man: TaskManager): - task_man.register_task('snap_cats', self.i18n['task.download_categories'].format('Snap'), get_icon_path()) - task_man.update_progress('snap_cats', 50, None) + if task_man: + task_man.register_task('snap_cats', self.i18n['task.download_categories'].format('Snap'), get_icon_path()) + task_man.update_progress('snap_cats', 50, None) def _finish_category_task(self, task_man: TaskManager): - task_man.update_progress('snap_cats', 100, None) - task_man.finish_task('snap_cats') + if task_man: + task_man.update_progress('snap_cats', 100, None) + task_man.finish_task('snap_cats') def prepare(self, task_manager: TaskManager, root_password: str, internet_available: bool): CategoriesDownloader(id_='snap', manager=self, http_client=self.http_client, logger=self.logger, diff --git a/bauh/gems/web/controller.py b/bauh/gems/web/controller.py index ce062fc2..925f8980 100644 --- a/bauh/gems/web/controller.py +++ b/bauh/gems/web/controller.py @@ -251,6 +251,10 @@ class WebApplicationManager(SoftwareManager): index = self._read_search_index() + if not index and self.suggestions_downloader and self.suggestions_downloader.is_alive(): + self.suggestions_downloader.join() + index = self._read_search_index() + if index: split_words = lower_words.split(' ') singleword = ''.join(lower_words) diff --git a/bauh/view/core/controller.py b/bauh/view/core/controller.py index a7b88d71..62bca641 100755 --- a/bauh/view/core/controller.py +++ b/bauh/view/core/controller.py @@ -356,10 +356,10 @@ class GenericSoftwareManager(SoftwareManager): def prepare(self, task_manager: TaskManager, root_password: str, internet_available: bool): if self.managers: internet_on = internet.is_available() + taskman = task_manager if task_manager else TaskManager() # empty task manager to prevent null pointers for man in self.managers: if man not in self._already_prepared and self._can_work(man): - if task_manager: - man.prepare(task_manager, root_password, internet_on) + man.prepare(taskman, root_password, internet_on) self._already_prepared.append(man) def list_updates(self, internet_available: bool = None) -> List[PackageUpdate]: