From f198e8eeafe59228e2edfd3823aa12e8cbafdf01 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 21 Dec 2017 06:35:42 +0100 Subject: multiarchanalyze: opportunistically emit a version when unique --- multiarchanalyze.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'multiarchanalyze.py') diff --git a/multiarchanalyze.py b/multiarchanalyze.py index f00c66a..d1947a2 100755 --- a/multiarchanalyze.py +++ b/multiarchanalyze.py @@ -167,6 +167,13 @@ def main(): if row and row[0] and not cur.fetchone(): hint["source"] = row[0] + if "version" not in hint: + cur.execute("SELECT distinct(version) FROM package WHERE name = ?;", + (hint["binary"],)) + row = cur.fetchone() + if row and row[0] and not cur.fetchone(): + hint["version"] = row[0] + if hint.get("severity") == "rdeps": cur.execute("SELECT count(*) FROM depends WHERE dependee = ?;", (hint["binary"],)) -- cgit v1.2.3