diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2017-02-03 17:22:21 +0000 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2017-05-11 08:24:20 +0000 |
commit | 0f3be37213250bd10253eb6ab25778d2bb6df3dd (patch) | |
tree | dbbcce0d009a1c5ce46cb617928610a8ba0fb152 | |
parent | d4be2c1e48489729b71a9d2806b1650900f46e4a (diff) | |
download | ybd-0f3be37213250bd10253eb6ab25778d2bb6df3dd.tar.gz |
Make ybd+rpm generate rpms for every system in a cluster
-rwxr-xr-x | ybd/__main__.py | 11 | ||||
-rw-r--r-- | ybd/rpm.py | 6 |
2 files changed, 10 insertions, 7 deletions
diff --git a/ybd/__main__.py b/ybd/__main__.py index e86b75c..52fd9f0 100755 --- a/ybd/__main__.py +++ b/ybd/__main__.py @@ -124,7 +124,16 @@ with timer('TOTAL'): os._exit(1) if config.get('generate-rpms', False) is True: - package_rpms(target) + if target['kind'] == 'system': + package_rpms(target) + elif target['kind'] == 'cluster': + # call package_rpms for each system in the cluster + for system in target['systems']: + package_rpms(system['path']) + else: + log('RPM', + ('%s is a %s, cannot package rpms!' + % (target['name'], target['kind']))) if config.get('reproduce'): log('REPRODUCED', @@ -203,12 +203,6 @@ def package_rpms(system): if type(system) is not dict: system = app.defs.get(system) - system_kind = system.get('kind') - if system_kind != 'system': - log('RPM', - '%s is not a system, cannot package rpms !' % system.get('name'), - exit=True) - with sandbox.setup(system): install_contents(system) |