mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 20:22:46 +00:00
Fix koji tito.props release hack.
This commit is contained in:
parent
b5ef1cf8ad
commit
1062426b19
3 changed files with 13 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
[globalconfig]
|
||||
default_builder = spacewalk.releng.builder.Builder
|
||||
default_builder = spacewalk.releng.builder.UpstreamBuilder
|
||||
default_tagger = spacewalk.releng.tagger.VersionTagger
|
||||
lib_dir = rel-eng/custom/
|
||||
|
||||
|
|
|
@ -484,14 +484,13 @@ class ReleaseModule(BaseCliModule):
|
|||
"""
|
||||
Support the old style CVS/koji builds when config is still in global
|
||||
tito.props, as opposed to the new releasers.conf.
|
||||
"""
|
||||
if releaser_config.has_section("cvs"):
|
||||
# Looks like the user already created an appropriate cvs release
|
||||
# target, we can safely leave this config alone.
|
||||
return
|
||||
|
||||
# Otherwise setup a releaser target as if they'd defined one:
|
||||
if self.global_config.has_section('cvs'):
|
||||
If the releasers.conf has a
|
||||
"""
|
||||
|
||||
# Handle cvs:
|
||||
if self.global_config.has_section('cvs') and not \
|
||||
releaser_config.has_section("cvs"):
|
||||
print("WARNING: legacy 'cvs' section in tito.props, please "
|
||||
"consider creating a target in releasers.conf.")
|
||||
print("Simulating 'cvs' release target for now.")
|
||||
|
@ -501,7 +500,10 @@ class ReleaseModule(BaseCliModule):
|
|||
if self.global_config.has_option("cvs", opt):
|
||||
releaser_config.set('cvs', opt, self.global_config.get(
|
||||
"cvs", opt))
|
||||
if self.global_config.has_section("koji"):
|
||||
|
||||
# Handle koji:
|
||||
if self.global_config.has_section("koji") and not \
|
||||
releaser_config.has_section("koji"):
|
||||
print("WARNING: legacy 'koji' section in tito.props, please "
|
||||
"consider creating a target in releasers.conf.")
|
||||
print("Simulating 'koji' release target for now.")
|
||||
|
|
|
@ -104,10 +104,12 @@ def create_builder(package_name, build_tag, build_version, options,
|
|||
builder_class = BUILDER_SHORTCUTS[builder_class]
|
||||
|
||||
if builder_class is None:
|
||||
debug("---- Builder class is None")
|
||||
if pkg_config.has_option("buildconfig", "builder"):
|
||||
builder_class = get_class_by_name(pkg_config.get("buildconfig",
|
||||
"builder"))
|
||||
else:
|
||||
debug("---- Global config")
|
||||
builder_class = get_class_by_name(global_config.get(
|
||||
GLOBALCONFIG_SECTION, DEFAULT_BUILDER))
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue