summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2018-05-23 15:29:09 -0400
committerScott Moser <smoser@brickies.net>2018-05-23 15:29:09 -0400
commit32c485bdc6e1eee0ad1d92dcd633a4e7ac9ac7a6 (patch)
tree2930145e04ef4e0206836f9c477b70703dfc0849
parent2ab8960402677ab66583d56dcb7704369a1256f5 (diff)
downloadvyos-cloud-init-32c485bdc6e1eee0ad1d92dcd633a4e7ac9ac7a6.tar.gz
vyos-cloud-init-32c485bdc6e1eee0ad1d92dcd633a4e7ac9ac7a6.zip
packages/brpm: Get proper dependencies for cmdline distro.
When invoked with '--distro=suse', the packages that would be attempted for installation would be from redhat. We just were not pasing the args.distro through. That is fixed here.
-rwxr-xr-xpackages/brpm6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/brpm b/packages/brpm
index 3439cf35..a154ef29 100755
--- a/packages/brpm
+++ b/packages/brpm
@@ -42,13 +42,13 @@ def run_helper(helper, args=None, strip=True):
return stdout
-def read_dependencies(requirements_file='requirements.txt'):
+def read_dependencies(distro, requirements_file='requirements.txt'):
"""Returns the Python package depedencies from requirements.txt files.
@returns a tuple of (requirements, test_requirements)
"""
pkg_deps = run_helper(
- 'read-dependencies', args=['--distro', 'redhat']).splitlines()
+ 'read-dependencies', args=['--distro', distro]).splitlines()
test_deps = run_helper(
'read-dependencies', args=[
'--requirements-file', 'test-requirements.txt',
@@ -83,7 +83,7 @@ def generate_spec_contents(args, version_data, tmpl_fn, top_dir, arc_fn):
rpm_upstream_version = version_data['version']
subs['rpm_upstream_version'] = rpm_upstream_version
- deps, test_deps = read_dependencies()
+ deps, test_deps = read_dependencies(distro=args.distro)
subs['buildrequires'] = deps + test_deps
subs['requires'] = deps