diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index 39d39f75..dfe58646 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -416,7 +416,7 @@ class ArchManager(SoftwareManager): pkg_mirrors = self._map_mirrors(to_install) if pkg_mirrors: - final_optdeps = {dep: {'desc': odeps[dep], 'mirror': pkg_mirrors[dep]} for dep in to_install} + final_optdeps = {dep: {'desc': odeps.get(dep), 'mirror': pkg_mirrors.get(dep)} for dep in to_install if dep in pkg_mirrors} deps_to_install = confirmation.request_optional_deps(pkgname, final_optdeps, handler.watcher, self.i18n) diff --git a/bauh/gems/arch/model.py b/bauh/gems/arch/model.py index 45cf9c02..49458771 100644 --- a/bauh/gems/arch/model.py +++ b/bauh/gems/arch/model.py @@ -100,7 +100,7 @@ class ArchPackage(SoftwarePackage): def can_be_run(self) -> bool: # only returns if there is a desktop entry set for the application to avoid running command-line applications - return bool(self.desktop_entry) + return bool(self.command) and bool(self.desktop_entry) def get_publisher(self): return self.maintainer diff --git a/bauh/view/core/controller.py b/bauh/view/core/controller.py index 67b8c290..b0d87b6b 100755 --- a/bauh/view/core/controller.py +++ b/bauh/view/core/controller.py @@ -1,4 +1,5 @@ import time +import traceback from argparse import Namespace from threading import Thread from typing import List, Set, Type @@ -204,7 +205,16 @@ class GenericSoftwareManager(SoftwareManager): man = self._get_manager_for(app) if man: - return man.install(app, root_password, handler) + ti = time.time() + try: + self.logger.info('Installing {}'.format(app)) + return man.install(app, root_password, handler) + except: + traceback.print_exc() + return False + finally: + tf = time.time() + self.logger.info('Installation of {} took {} seconds'.format(app, tf - ti)) def get_info(self, app: SoftwarePackage): man = self._get_manager_for(app)