From 35210b769804c0c3a5ac252575d48bba4abab509 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 30 Aug 2015 15:14:24 +0200 Subject: [PATCH] reproducible: display correct up2date version for blacklisted packages --- bin/reproducible_common.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index 31ad7338..020336d0 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -673,7 +673,16 @@ class Build: except IndexError: # there is no package with this name in this return # suite/arch, or none at all self.status = str(result[0]) - self.version = str(result[1]) + if self.status != 'blacklisted': + self.version = str(result[1]) + else + query = 'SELECT version FROM sources WHERE name="{}" ' + \ + 'AND suite="{}" AND architecture="{}"' + query = query.format(self.package, self.suite, self.arch) + try: + self.version = query_db(query)[0][0] + except IndexError: # there is no package with this name in this + self.version = '' # suite/arch, or none at all if result[2]: self.build_date = str(result[2]) + ' UTC' -- GitLab