diff options
author | Helmut Grohne <helmut@subdivi.de> | 2017-12-21 06:35:42 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2017-12-21 06:35:42 +0100 |
commit | f198e8eeafe59228e2edfd3823aa12e8cbafdf01 (patch) | |
tree | f822c18e27fcde3ecf950058415982a61d856248 | |
parent | 7d08d1d5b8dd07024df15b936b8f716229b3a129 (diff) | |
download | debian-dedup-f198e8eeafe59228e2edfd3823aa12e8cbafdf01.tar.gz |
multiarchanalyze: opportunistically emit a version when unique
-rwxr-xr-x | multiarchanalyze.py | 7 |
1 files changed, 7 insertions, 0 deletions
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"],)) |