summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2020-07-24 12:59:49 -0500
committerGitHub <noreply@github.com>2020-07-24 13:59:49 -0400
commit456fb55744a1acc6bd2f464b7656a9c33d0b7ac5 (patch)
tree85d58b01af5d8673e12c9f96c08ce5c90118f721 /packages
parentb70aec8e5ed59298e9fbd5da449350dd3d0002d2 (diff)
downloadvyos-cloud-init-456fb55744a1acc6bd2f464b7656a9c33d0b7ac5.tar.gz
vyos-cloud-init-456fb55744a1acc6bd2f464b7656a9c33d0b7ac5.zip
fix brpm building
tools/read-dependencies: - Add parameters --build-requires, --runtime-requires - Sort dependency output before printing package/brpm - use --build-requires, --runtime-requires to separate build/vs runtime package reqs. LP: #1886107
Diffstat (limited to 'packages')
-rwxr-xr-xpackages/brpm18
1 files changed, 11 insertions, 7 deletions
diff --git a/packages/brpm b/packages/brpm
index 56477d2e..a9fd0b70 100755
--- a/packages/brpm
+++ b/packages/brpm
@@ -46,15 +46,19 @@ def run_helper(helper, args=None, strip=True):
def read_dependencies(distro):
"""Returns the Python package depedencies from requirements.txt files.
- @returns a tuple of (requirements, test_requirements)
+ @returns a tuple of (build_deps, run_deps, test_deps)
"""
- pkg_deps = run_helper(
- 'read-dependencies', args=['--distro', distro]).splitlines()
+ build_deps = run_helper(
+ 'read-dependencies',args=[
+ '--distro', distro, '--build-requires']).splitlines()
+ run_deps = run_helper(
+ 'read-dependencies', args=[
+ '--distro', distro, '--runtime-requires']).splitlines()
test_deps = run_helper(
'read-dependencies', args=[
'--requirements-file', 'test-requirements.txt',
'--system-pkg-names']).splitlines()
- return (pkg_deps, test_deps)
+ return (build_deps, run_deps, test_deps)
def read_version():
@@ -84,9 +88,9 @@ 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(distro=args.distro)
- subs['buildrequires'] = deps + test_deps
- subs['requires'] = deps
+ build_deps, run_deps, test_deps = read_dependencies(distro=args.distro)
+ subs['buildrequires'] = build_deps + test_deps
+ subs['requires'] = run_deps
if args.boot == 'sysvinit':
subs['sysvinit'] = True