diff --git a/bauh/gems/arch/confirmation.py b/bauh/gems/arch/confirmation.py index 2ca3df79..422ed261 100644 --- a/bauh/gems/arch/confirmation.py +++ b/bauh/gems/arch/confirmation.py @@ -7,9 +7,10 @@ from bauh.commons.html import bold def request_optional_deps(pkgname: str, pkg_mirrors: dict, watcher: ProcessWatcher, i18n: dict) -> Set[str]: + opts = [InputOption('{}{} ( {} )'.format(p, ': ' + d['desc'] if d['desc'] else '', d['mirror'].upper()), p) for p, d in pkg_mirrors.items()] view_opts = MultipleSelectComponent(label='', - options=[InputOption('{}{} ( {} )'.format(p, ': ' + d['desc'] if d['desc'] else '', d['mirror'].upper()), p) - for p, d in pkg_mirrors.items()]) + options=opts, + default_options=set(opts)) install = watcher.request_confirmation(title=i18n['arch.install.optdeps.request.title'], body='

{}

'.format(i18n['arch.install.optdeps.request.body'].format(bold(pkgname)) + ':'), components=[view_opts], diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index 6d6c9a14..5b96a004 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -381,7 +381,6 @@ class ArchManager(SoftwareManager): check_res = makepkg.check_missing_deps(pkgdir, handler.watcher) if check_res: - if check_res.get('gpg_key'): if handler.watcher.request_confirmation(title=self.i18n['arch.aur.install.unknown_key.title'], body=self.i18n['arch.install.aur.unknown_key.body'].format(bold(pkgname), bold(check_res['gpg_key']))): diff --git a/bauh/gems/arch/message.py b/bauh/gems/arch/message.py index 5e92c090..df02103b 100644 --- a/bauh/gems/arch/message.py +++ b/bauh/gems/arch/message.py @@ -1,20 +1,21 @@ from bauh.api.abstract.handler import ProcessWatcher from bauh.api.abstract.view import MessageType +from bauh.commons.html import bold def show_dep_not_installed(watcher: ProcessWatcher, pkgname: str, depname: str, i18n: dict): watcher.show_message(title=i18n['error'], - body=i18n['arch.install.dependency.install.error'].format('"{}"'.format(depname), '"{}"'.format(pkgname)), + body=i18n['arch.install.dependency.install.error'].format(bold(depname), bold(pkgname)), type_=MessageType.ERROR) def show_dep_not_found(depname: str, i18n: dict, watcher: ProcessWatcher): watcher.show_message(title=i18n['arch.install.dep_not_found.title'], - body=i18n['arch.install.dep_not_found.body'].format('"{}"'.format(depname)), + body=i18n['arch.install.dep_not_found.body'].format(bold(depname)), type_=MessageType.ERROR) def show_optdep_not_installed(depname: str, watcher: ProcessWatcher, i18n: dict): watcher.show_message(title=i18n['error'], - body=i18n['arch.install.optdep.error'].format('"{}"'.format(depname)), + body=i18n['arch.install.optdep.error'].format(bold(depname)), type_=MessageType.ERROR)