From e597a15e8ffd04b2a1bac46d26732e8cff5bcea0 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Thu, 12 Jan 2012 15:45:06 +0200 Subject: [PATCH] import-srpm: add 'vendor' config option Intended to represent the distribution vendor (e.g. 'Debian'). Currently, this can be used in tag format strings. NOTE: the vendor name is converted to lowercase when used in tag names. Signed-off-by: Markus Lehtonen Conflicts: gbp/config.py --- gbp/config.py | 1 + gbp/scripts/import_srpm.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gbp/config.py b/gbp/config.py index 6a93c3c..820a495 100644 --- a/gbp/config.py +++ b/gbp/config.py @@ -576,6 +576,7 @@ class GbpOptionParserRpm(GbpOptionParser): Handles commandline options and parsing of config files for rpm tools """ defaults = dict(GbpOptionParser.defaults) +<<<<<<< HEAD defaults.update( { 'vendor' : 'vendor', 'native' : 'auto', diff --git a/gbp/scripts/import_srpm.py b/gbp/scripts/import_srpm.py index 57003fa..120dda7 100755 --- a/gbp/scripts/import_srpm.py +++ b/gbp/scripts/import_srpm.py @@ -219,6 +219,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") <<<<<<< HEAD @@ -411,7 +413,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) @@ -556,8 +558,7 @@ def main(argv): pkgsubdir = os.path.join(upstream.unpacked, ======= 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'], -- 2.7.4