From c13e1ca2745ca96a387578dab17f2bae59d15ffc Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Tue, 1 Aug 2017 19:05:01 +0200 Subject: [PATCH] Let's try to include the channels' specific version in the JSON --- roles/repo2json/files/rhel_to_json.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/repo2json/files/rhel_to_json.py b/roles/repo2json/files/rhel_to_json.py index 7e81d9a690..bfe559e01b 100644 --- a/roles/repo2json/files/rhel_to_json.py +++ b/roles/repo2json/files/rhel_to_json.py @@ -207,6 +207,8 @@ def main(): pkg.basename]['channel']: output['packages'][pkg.basename]['channel'].append( channel) + output['packages'][pkg.basename][ + 'channels'][channel] = pkg.version # TODO: checks if the evr is more recent or not # (and update if it is) @@ -217,7 +219,8 @@ def main(): 'epoch': pkg.epoch, 'version': pkg.version, 'release': pkg.release, - 'channel': [channel] + 'channel': [channel], + 'channels': {channel: pkg.version}, } cnt += 1 print '%s packages in %s' % (cnt, cur_fold)