diff options
author | Pierre-Yves Chibon <pingou@pingoured.fr> | 2015-01-31 10:01:50 +0100 |
---|---|---|
committer | Pierre-Yves Chibon <pingou@pingoured.fr> | 2015-02-02 09:56:26 +0100 |
commit | 02a6b0e48bf4ee78ca37bf1bab5f50f9d6b6c55b (patch) | |
tree | d284bd972ff43a3cfa2caf592cfd3f771ee73030 | |
parent | f137ccb74c483024c85cc8c3b4106620765b2008 (diff) | |
download | ansible-02a6b0e48bf4ee78ca37bf1bab5f50f9d6b6c55b.tar.gz ansible-02a6b0e48bf4ee78ca37bf1bab5f50f9d6b6c55b.tar.xz ansible-02a6b0e48bf4ee78ca37bf1bab5f50f9d6b6c55b.zip |
Save the channel on which the package can be found
-rw-r--r-- | roles/repo2json/files/rhel_to_json.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/repo2json/files/rhel_to_json.py b/roles/repo2json/files/rhel_to_json.py index ad2f133ca..c5b975112 100644 --- a/roles/repo2json/files/rhel_to_json.py +++ b/roles/repo2json/files/rhel_to_json.py @@ -161,6 +161,7 @@ def main(): for el in PATHS: + channel = os.path.basename(el) output = {'packages': {}, 'arches': []} dbfiles = find_primary_sqlite(PATHS[el]) @@ -189,6 +190,11 @@ def main(): pkg.arch) if pkg.arch not in output['arches']: output['arches'].append(pkg.arch) + if channel not in output['packages'][ + pkg.basename]['channel']: + output['packages'][pkg.basename]['channel'].append( + channel) + # TODO: checks if the evr is more recent or not # (and update if it is) else: @@ -198,6 +204,7 @@ def main(): 'epoch': pkg.epoch, 'version': pkg.version, 'release': pkg.release, + 'channel': [channel] } cnt += 1 print '%s packages in %s' % (cnt, cur_fold) |