diff options
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/config.py | 3 | ||||
-rwxr-xr-x | gbp/scripts/import_srpm.py | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/gbp/config.py b/gbp/config.py index 02a6f06f..af21fb8a 100644 --- a/gbp/config.py +++ b/gbp/config.py @@ -524,6 +524,7 @@ class GbpOptionParserRpm(GbpOptionParser): defaults = dict(GbpOptionParser.defaults) defaults.update({ 'tmp-dir' : '/var/tmp/gbp/', + 'vendor' : 'Downstream', 'packaging-branch' : 'master', 'packaging-dir' : '', 'packaging-tag' : 'packaging/%(version)s', @@ -534,6 +535,8 @@ class GbpOptionParserRpm(GbpOptionParser): 'tmp-dir': "Base directory under which temporary directories are " "created, default is '%(tmp-dir)s'", + 'vendor': + "Distribution vendor name, default is '%(vendor)s'", 'packaging-branch': "Branch the packaging is being maintained on, rpm counterpart " "of the 'debian-branch' option, default is " diff --git a/gbp/scripts/import_srpm.py b/gbp/scripts/import_srpm.py index 7fd5a4e7..193b9245 100755 --- a/gbp/scripts/import_srpm.py +++ b/gbp/scripts/import_srpm.py @@ -143,6 +143,8 @@ def parse_args(argv): parser.add_config_file_option(option_name="color-scheme", dest="color_scheme") parser.add_config_file_option(option_name="tmp-dir", dest="tmp_dir") + parser.add_config_file_option(option_name="vendor", action="store", + dest="vendor") parser.add_option("--download", action="store_true", dest="download", default=False, help="download source package") branch_group.add_config_file_option(option_name="packaging-branch", @@ -301,7 +303,7 @@ def main(argv): src_tag_format = options.packaging_tag if options.native \ else options.upstream_tag - tag_str_fields = spec.version + tag_str_fields = dict(spec.version, vendor=options.vendor.lower()) src_tag = repo.version_to_tag(src_tag_format, tag_str_fields) ver_str = compose_version_str(spec.version) @@ -388,8 +390,7 @@ def main(argv): raise GbpError tag = repo.version_to_tag(options.packaging_tag, tag_str_fields) - pkg_vendor = "Native" if options.native else "Downstrean" - msg = "%s release %s" % (pkg_vendor, ver_str) + msg = "%s release %s" % (options.vendor, ver_str) if options.orphan_packaging or not sources: commit = repo.commit_dir(dirs['packaging_base'], |