rpm refactor: rewrite set_tag functionality
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 3 Jan 2013 10:43:08 +0000 (12:43 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 14 Nov 2014 12:46:23 +0000 (14:46 +0200)
In addition to refactoring, make sure that we keep the internal _tags
structure in sync.

Changes the default place for new tags: add new tags after the 'Name:'
tag instead of 'Release:'.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp/scripts/buildpackage_rpm.py

index 187e6b2..338350c 100755 (executable)
@@ -610,7 +610,7 @@ def main(argv):
                                           abbrev=40) + '-dirty'
                 commit_sha1 = repo.rev_parse('HEAD') + '-dirty'
         # Put 'VCS:' tag to .spec
-        spec.set_tag('vcs',
+        spec.set_tag('VCS', None,
                      options.spec_vcs_tag % {'tagname': tree_name,
                                              'commit': commit_sha1})
         spec.write_spec_file()