From 4339b112d0011dcb2ba78cbf2669c14fa01fcb76 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 15 Feb 2018 16:34:50 +0100 Subject: [PATCH] Fix yum spider for versions with >1 repo rpm The code was supposed to pick the latest version of the repo rpm in this scenario, but at some point the data structure was updated and the code was not, so it ended up actually picking the *oldest* version of the repo rpm. --- tools/ftp/spider_yum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ftp/spider_yum.py b/tools/ftp/spider_yum.py index 3c576a8f..5db95250 100755 --- a/tools/ftp/spider_yum.py +++ b/tools/ftp/spider_yum.py @@ -77,7 +77,7 @@ if __name__ == "__main__": if pinfo['p'] == familypath and pinfo['f'] == shortdist: if not reporpms[v].has_key(p): reporpms[v][p] = {} - reporpms[v][p][arch] = max(ver, reporpms[v].get(p, 0)) + reporpms[v][p][arch] = max(ver, reporpms[v][p].get(arch, 0)) platforms[p]['found'] = True break else: -- 2.39.5