From 9295b2b88cd6f2d56c08a255d164ca1b4f661e35 Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Mon, 9 Oct 2023 20:26:25 +0200
Subject: multiarchanalyze.sql: do not emit an arch:all hint if provides differ

The architecture-properties package should not be arch:all, because its
provides are architecture-dependent.

Reported-by: Niels Thykier <niels@thykier.net>
---
 multiarchanalyze.sql | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'multiarchanalyze.sql')

diff --git a/multiarchanalyze.sql b/multiarchanalyze.sql
index b94a367..79d62c3 100644
--- a/multiarchanalyze.sql
+++ b/multiarchanalyze.sql
@@ -158,6 +158,16 @@ CREATE VIEW archall_candidate AS
 					SELECT 1 FROM content AS c5
 					WHERE c5.pid = p3.id
 						AND c5.filename = c2.filename))
+		AND NOT EXISTS (
+			SELECT 1
+			FROM package AS p4, package AS p5, provides AS r1
+			WHERE p4.name = p1.name
+				AND p5.name = p1.name
+				AND r1.pid = p4.id
+				AND NOT EXISTS (
+					SELECT 1 FROM provides AS r2
+					WHERE r2.pid = p5.id
+						AND r1.provided = r2.provided))
 		AND p1.hasarchdeps = 0;
 
 /* Packages that coud be marked Multi-Arch:same, because they
-- 
cgit v1.2.3

