From e13febc81706fbfb7f073bc4e9ce73fbc80d5180 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 18 Nov 2023 10:36:10 +0000 Subject: Stop replacements cluttering comparisons This stops the replaced package getting compared with it's replacement. --- guix-data-service/comparison.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'guix-data-service') diff --git a/guix-data-service/comparison.scm b/guix-data-service/comparison.scm index dc521a4..10a5ce7 100644 --- a/guix-data-service/comparison.scm +++ b/guix-data-service/comparison.scm @@ -395,6 +395,15 @@ FULL OUTER JOIN target_packages AND base_packages.version = target_packages.version AND base_packages.system = target_packages.system AND base_packages.target = target_packages.target + AND ( + ( + base_packages.replacement_package_id IS NULL AND + target_packages.replacement_package_id IS NULL + ) OR ( + base_packages.replacement_package_id IS NOT NULL AND + target_packages.replacement_package_id IS NOT NULL + ) + ) WHERE ( base_packages.id IS NULL OR @@ -577,6 +586,15 @@ FROM base_packages FULL OUTER JOIN target_packages ON base_packages.name = target_packages.name AND base_packages.version = target_packages.version + AND ( + ( + base_packages.replacement_package_id IS NULL AND + target_packages.replacement_package_id IS NULL + ) OR ( + base_packages.replacement_package_id IS NOT NULL AND + target_packages.replacement_package_id IS NOT NULL + ) + ) WHERE base_packages.id IS NULL OR target_packages.id IS NULL OR -- cgit v1.2.3