diff options
author | Scott Moser <smoser@brickies.net> | 2016-08-08 13:24:59 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-08-08 17:52:24 -0400 |
commit | 48ec60ae19c749223cb58dcbdbf0ecb7343f2a31 (patch) | |
tree | 983b5efe44d5c92aa67d34e8ad304fc60acfeb98 /packages/brpm | |
parent | d0b2863bc8dfab2919b11bbcc2584c1c51223028 (diff) | |
download | vyos-cloud-init-48ec60ae19c749223cb58dcbdbf0ecb7343f2a31.tar.gz vyos-cloud-init-48ec60ae19c749223cb58dcbdbf0ecb7343f2a31.zip |
For upstream snapshot versions do not modify git-describe output.
For upstream version directly use the output of git-describe
(X.Y.Z-number.gHASH) rather than rather than changing it to
(X.Y.Z+number.gHASH).
The rpm version does not allow '-' in Version, so we create and use
rpm_upstream_version in the rpm spec file. That is of format:
X.Y.Z+number.gHASH
Diffstat (limited to 'packages/brpm')
-rwxr-xr-x | packages/brpm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/brpm b/packages/brpm index 14d75f2b..89696ab8 100755 --- a/packages/brpm +++ b/packages/brpm @@ -90,6 +90,15 @@ def generate_spec_contents(args, version_data, tmpl_fn, top_dir, arc_fn): subs['source_name'] = os.path.basename(arc_fn).replace('.tar.gz', '') subs.update(version_data) + # rpm does not like '-' in the Version, so change + # X.Y.Z-N-gHASH to X.Y.Z+N.gHASH + if "-" in version_data.get('version'): + ver, commits, ghash = version_data['version'].split("-") + rpm_upstream_version = "%s+%s.%s" % (ver, commits, ghash) + else: + rpm_upstream_version = version_data['version'] + subs['rpm_upstream_version'] = rpm_upstream_version + # Map to known packages python_deps = read_dependencies() package_deps = translate_dependencies(python_deps, args.distro) |