From: Markus Lehtonen Date: Thu, 12 Jan 2012 13:45:06 +0000 (+0200) Subject: import-srpm: add 'vendor' config option X-Git-Tag: debian/0.6.26~155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e597a15e8ffd04b2a1bac46d26732e8cff5bcea0;p=tools%2Fgit-buildpackage.git 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 --- 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'],