From fa2ecd87712f7920454966f37aa8a5b87382853c Mon Sep 17 00:00:00 2001 From: InsanePrawn Date: Thu, 17 Feb 2022 06:08:50 +0100 Subject: [PATCH] packages.py: also add package.replaces to dictionary as name (packages that offer `replaces` get preference by pacman over the replaced pkg) --- packages.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages.py b/packages.py index f32ae11..ecbf3be 100644 --- a/packages.py +++ b/packages.py @@ -116,9 +116,10 @@ def discover_packages(parallel: bool = True) -> dict[str, Package]: logging.debug('Building package dictionary!') for package in results: - if package.name in packages: - logging.warn(f'Overriding {packages[package.name]} with {package}') - packages[package.name] = package + for name in [package.name] + package.replaces: + if name in packages: + 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 for package in packages.values():