packages.py: also add package.replaces to dictionary as name
(packages that offer `replaces` get preference by pacman over the replaced pkg)
This commit is contained in:
parent
e72a7f31bb
commit
fa2ecd8771
1 changed files with 4 additions and 3 deletions
|
@ -116,9 +116,10 @@ def discover_packages(parallel: bool = True) -> dict[str, Package]:
|
||||||
|
|
||||||
logging.debug('Building package dictionary!')
|
logging.debug('Building package dictionary!')
|
||||||
for package in results:
|
for package in results:
|
||||||
if package.name in packages:
|
for name in [package.name] + package.replaces:
|
||||||
logging.warn(f'Overriding {packages[package.name]} with {package}')
|
if name in packages:
|
||||||
packages[package.name] = package
|
logging.warn(f'Overriding {packages[package.name]} with {package}')
|
||||||
|
packages[name] = package
|
||||||
|
|
||||||
# This filters the deps to only include the ones that are provided in this repo
|
# This filters the deps to only include the ones that are provided in this repo
|
||||||
for package in packages.values():
|
for package in packages.values():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue