diff options
author | Helmut Grohne <helmut@subdivi.de> | 2023-02-26 21:22:12 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2023-02-26 21:22:12 +0100 |
commit | 0dd6c40cba3c1919c44b88eda1f8f75aed6e70b9 (patch) | |
tree | ba852706fe4247490d094257697383cb31b6f19f | |
parent | 7fd673e4ba4a301b8a53f7b3fecf3b0208f237e6 (diff) | |
download | debian-dedup-0dd6c40cba3c1919c44b88eda1f8f75aed6e70b9.tar.gz |
multiarchanalyze: emit a hint for rust packages needing the ma workaround
-rwxr-xr-x | multiarchanalyze.py | 11 | ||||
-rw-r--r-- | multiarchanalyze.sql | 13 |
2 files changed, 24 insertions, 0 deletions
diff --git a/multiarchanalyze.py b/multiarchanalyze.py index afe8556..c54b056 100755 --- a/multiarchanalyze.py +++ b/multiarchanalyze.py @@ -161,6 +161,17 @@ def main(): link="https://wiki.debian.org/MultiArch/Hints#ma-foreign-library", severity="high")) + cur.execute("SELECT name FROM maworkaround_packages ORDER BY name;") + for name, in fetchiter(cur): + hints.append( + dict( + binary=name, + description="%s should be Architecture: any + Multi-Arch: same" % name, + link="https://wiki.debian.org/MultiArch/Hints#ma-workaround", + severity="high", + ) + ) + for hint in hints: if "source" not in hint: cur.execute("SELECT distinct(source) FROM package WHERE name = ?;", diff --git a/multiarchanalyze.sql b/multiarchanalyze.sql index 57f5f9b..b94a367 100644 --- a/multiarchanalyze.sql +++ b/multiarchanalyze.sql @@ -223,4 +223,17 @@ CREATE VIEW maforeign_library AS WHERE pid = p.id AND filename REGEXP '^\./(usr/)?s?bin/.*'); +/* Packages that should employ the m-a:interpreter workaround, because they + * * are known to expose the architecture of their dependencies (e.g. rust libraries) + * * are currently architecture-independent and multiarch:foreign + * * have an architecture-dependent dependency + */ +DROP VIEW IF EXISTS maworkaround_packages; +CREATE VIEW maworkaround_packages AS + SELECT name + FROM indeppackage AS i + WHERE name LIKE 'librust%-dev' + AND multiarch = 'foreign' + AND EXISTS (SELECT 1 FROM archdepcandidate WHERE dependerid = i.id); + COMMIT; |