diff --git a/bauh/gems/arch/aur.py b/bauh/gems/arch/aur.py index b1156fb8..111025f3 100644 --- a/bauh/gems/arch/aur.py +++ b/bauh/gems/arch/aur.py @@ -65,6 +65,20 @@ class AURClient: if res and res.text: return map_srcinfo(res.text) + self.logger.warning('No .SRCINFO found for {}'.format(name)) + self.logger.info('Checking if {} is based on another package'.format(name)) + # if was not found, it may be based on another package. + infos = self.get_info({name}) + + if infos: + info = infos[0] + + info_name = info.get('Name') + info_base = info.get('PackageBase') + if info_name and info_base and info_name != info_base: + self.logger.info('{p} is based on {b}. Retrieving {b} .SRCINFO'.format(p=info_name, b=info_base)) + return self.get_src_info(info_base) + def get_all_dependencies(self, name: str) -> Set[str]: deps = set() info = self.get_src_info(name) diff --git a/bauh/gems/arch/confirmation.py b/bauh/gems/arch/confirmation.py index 9c53f7fb..a34e1d44 100644 --- a/bauh/gems/arch/confirmation.py +++ b/bauh/gems/arch/confirmation.py @@ -22,7 +22,7 @@ def request_optional_deps(pkgname: str, pkg_mirrors: dict, watcher: ProcessWatch view_opts = MultipleSelectComponent(label='', options=opts, - default_options=None) + 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)), i18n['arch.install.optdeps.request.help']), diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index a7f954eb..5aa57123 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -400,7 +400,8 @@ class ArchManager(SoftwareManager): for dep in deps: handler.watcher.change_substatus(self.i18n['arch.install.dependency.install'].format(bold('{} ()'.format(dep[0], dep[1])))) if dep[1] == 'aur': - installed = self._install_from_aur(pkgname=dep[0], pkgbase=None, maintainer=None, root_password=root_password, handler=handler, dependency=True, change_progress=False) + pkgbase = self.aur_client.get_src_info(dep[0])['pkgbase'] + installed = self._install_from_aur(pkgname=dep[0], pkgbase=pkgbase, maintainer=None, root_password=root_password, handler=handler, dependency=True, change_progress=False) else: installed = self._install(pkgname=dep[0], maintainer=None, root_password=root_password, handler=handler, install_file=None, mirror=dep[1], change_progress=False)