[arch] improvement: explicitly marking installed dependent packages as 'dependencies' (installation)

This commit is contained in:
Vinicius Moreira
2022-01-31 15:26:37 -03:00
parent c718fe0a36
commit b130ad6d0b
3 changed files with 10 additions and 4 deletions

View File

@@ -11,9 +11,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- not rechecking sub-dependencies of an AUR dependency to be installed
- allowing AUR packages to be installed as dependencies of a repository package
- always listing repository packages as primary options when multiple providers for a given dependency are available
- installation: explicitly marking installed dependent packages as "dependencies" (`--asdeps`)
- settings:
- "Auto-define dependency providers" property renamed to "Auto-match dependency by name"
- new property 'prefer_repository_provider': automatically picks the single package from the repositories among several external (AUR) available as the provider for a given dependency
- new property 'prefer_repository_provider': automatically picks the single package from the repositories among several external (AUR) available as the provider for a given dependency
### Fixes
- General

View File

@@ -1760,7 +1760,8 @@ class ArchManager(SoftwareManager):
status_handler.start()
installed, _ = context.handler.handle_simple(pacman.install_as_process(pkgpaths=repo_dep_names,
root_password=context.root_password,
file=False),
file=False,
as_deps=True),
output_handler=status_handler.handle)
if installed:
@@ -2427,7 +2428,8 @@ class ArchManager(SoftwareManager):
root_password=context.root_password,
file=context.has_install_files(),
pkgdir=context.project_dir,
overwrite_conflicting_files=overwrite_files),
overwrite_conflicting_files=overwrite_files,
as_deps=context.dependency),
output_handler=status_handler.handle if status_handler else None)
def _handle_install_call(self, context: TransactionContext, to_install: List[str], status_handler) -> bool:

View File

@@ -147,7 +147,7 @@ def map_installed(names: Iterable[str] = None) -> dict: # returns a dict with w
def install_as_process(pkgpaths: Iterable[str], root_password: str, file: bool, pkgdir: str = '.',
overwrite_conflicting_files: bool = False, simulate: bool = False) -> SimpleProcess:
overwrite_conflicting_files: bool = False, simulate: bool = False, as_deps: bool = False) -> SimpleProcess:
cmd = ['pacman', '-U'] if file else ['pacman', '-S']
cmd.extend(pkgpaths)
@@ -158,6 +158,9 @@ def install_as_process(pkgpaths: Iterable[str], root_password: str, file: bool,
if overwrite_conflicting_files:
cmd.append('--overwrite=*')
if as_deps:
cmd.append('--asdeps')
return SimpleProcess(cmd=cmd,
root_password=root_password,
cwd=pkgdir,