From dabbbbb3cf0354b8b4907c09788eeee50cad46df Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sat, 31 Jan 2015 10:04:00 +0100 Subject: [PATCH] Add some documentation about what's going on --- roles/repo2json/files/rhel_to_json.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/repo2json/files/rhel_to_json.py b/roles/repo2json/files/rhel_to_json.py index c5b975112c..e3eaeb8401 100644 --- a/roles/repo2json/files/rhel_to_json.py +++ b/roles/repo2json/files/rhel_to_json.py @@ -184,12 +184,15 @@ def main(): new = 0 for pkg in session.query(Package).all(): if pkg.basename in output['packages']: + # Update the list of arches the package has if pkg.arch not in output['packages'][ pkg.basename]['arch']: output['packages'][pkg.basename]['arch'].append( pkg.arch) + # Adjust the gobal list of all arches in the RHEL if pkg.arch not in output['arches']: output['arches'].append(pkg.arch) + # Update the list of channels the package is in if channel not in output['packages'][ pkg.basename]['channel']: output['packages'][pkg.basename]['channel'].append(