summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2017-12-21 06:35:42 +0100
committerHelmut Grohne <helmut@subdivi.de>2017-12-21 06:35:42 +0100
commitf198e8eeafe59228e2edfd3823aa12e8cbafdf01 (patch)
treef822c18e27fcde3ecf950058415982a61d856248
parent7d08d1d5b8dd07024df15b936b8f716229b3a129 (diff)
downloaddebian-dedup-f198e8eeafe59228e2edfd3823aa12e8cbafdf01.tar.gz
multiarchanalyze: opportunistically emit a version when unique
-rwxr-xr-xmultiarchanalyze.py7
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"],))