diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-10-05 12:02:21 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-10-05 12:02:21 -0700 |
commit | cb30e7ed56e2c26e654d1703d3f44495a160c6eb (patch) | |
tree | 093de0a6e63a741de62236678b5595e6240932a8 /packages | |
parent | f73abb10210e21da858b99238e2945e5bf1cfac2 (diff) | |
parent | 7a2e678685dbc94e13f6d8ca6a5e92000e1f974f (diff) | |
download | vyos-cloud-init-cb30e7ed56e2c26e654d1703d3f44495a160c6eb.tar.gz vyos-cloud-init-cb30e7ed56e2c26e654d1703d3f44495a160c6eb.zip |
Merged brpm changelog fixes
Diffstat (limited to 'packages')
-rwxr-xr-x | packages/brpm | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/packages/brpm b/packages/brpm index 1735f5bb..7975e05c 100755 --- a/packages/brpm +++ b/packages/brpm @@ -58,8 +58,7 @@ def get_log_header(version): a_rev = rev break if not a_rev: - return format_change_line(datetime.now(), - '??', version) + return None # Extract who made that tag as the header cmd = ['bzr', 'log', '-r%s' % (a_rev), '--timezone=utc'] @@ -127,13 +126,23 @@ def generate_spec_contents(args, tmpl_fn, top_dir, arc_fn): # Format a nice changelog (as best as we can) changelog = util.load_file(util.abs_join(find_root(), 'ChangeLog')) changelog_lines = [] + missing_versions = 0 for line in changelog.splitlines(): if not line.strip(): continue if re.match(r"^\s*[\d][.][\d][.][\d]:\s*", line): line = line.strip(":") header = get_log_header(line) - changelog_lines.append(header) + if not header: + missing_versions += 1 + if missing_versions == 1: + # Must be using a new 'dev'/'trunk' release + changelog_lines.append(format_change_line(datetime.now(), '??')) + else: + sys.stderr.write(("Changelog version line %s " + "does not have a corresponding tag!\n") % (line)) + else: + changelog_lines.append(header) else: changelog_lines.append(line) subs['changelog'] = "\n".join(changelog_lines) |