aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-11-18 10:36:10 +0000
committerChristopher Baines <mail@cbaines.net>2023-11-18 10:36:10 +0000
commite13febc81706fbfb7f073bc4e9ce73fbc80d5180 (patch)
tree84ddfef55d5c28212b85419009a5e4042699c00c /guix-data-service
parentb2bf948a00b582573fa5a3819fa04fac6977a608 (diff)
downloaddata-service-e13febc81706fbfb7f073bc4e9ce73fbc80d5180.tar
data-service-e13febc81706fbfb7f073bc4e9ce73fbc80d5180.tar.gz
Stop replacements cluttering comparisons
This stops the replaced package getting compared with it's replacement.
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/comparison.scm18
1 files changed, 18 insertions, 0 deletions
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