summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2017-06-13 17:56:58 +0100
committerBen Brown <ben.brown@codethink.co.uk>2017-06-13 18:19:51 +0100
commitea244d81fe52259fa3ce4cd611a49d015add40e1 (patch)
tree8928bdb9ec8d323a1cb0ea4f10b8211af826adc1
parent0d3798f8143373ef1eb343761fe99eb5a925069b (diff)
downloadybd-ea244d81fe52259fa3ce4cd611a49d015add40e1.tar.gz
Allow generating rpms from chunks/strata
Installs dependencies into sandbox if target is not a system.
-rwxr-xr-xybd/__main__.py2
-rw-r--r--ybd/rpm.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/ybd/__main__.py b/ybd/__main__.py
index 926a589..4e47f38 100755
--- a/ybd/__main__.py
+++ b/ybd/__main__.py
@@ -133,7 +133,7 @@ with timer('TOTAL'):
if not isinstance(whitelist, list):
whitelist = None
- if target['kind'] == 'system':
+ if target['kind'] in ('system', 'stratum', 'chunk'):
package_rpms(target, whitelist)
elif target['kind'] == 'cluster':
# call package_rpms for each system in the cluster
diff --git a/ybd/rpm.py b/ybd/rpm.py
index d6a9bd0..cdf515c 100644
--- a/ybd/rpm.py
+++ b/ybd/rpm.py
@@ -514,6 +514,8 @@ def package_rpms(system, whitelist=None):
with sandbox.setup(system):
assembly.install_contents(system)
+ if system.get('kind') != "system":
+ assembly.install_dependencies(system)
# Fail now if missing `rpm` or `rpmbuild`
env_vars = sandbox.env_vars_for_build(system)