Permalink
Browse files

Fix koji tito.props release hack.

  • Loading branch information...
dgoodwin committed Oct 24, 2011
1 parent b5ef1cf commit 1062426b19fb5489fe4b152085f271416f766a2c
Showing with 12 additions and 8 deletions.
  1. +1 −1 rel-eng/tito.props
  2. +9 −7 src/tito/cli.py
  3. +2 −0 src/tito/common.py
View
@@ -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/
View
@@ -484,14 +484,13 @@ def _legacy_builder_hack(self, releaser_config):
"""
Support the old style CVS/koji builds when config is still in global
tito.props, as opposed to the new releasers.conf.
+
+ If the releasers.conf has a
"""
- 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'):
+ # 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 @@ def _legacy_builder_hack(self, releaser_config):
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.")
View
@@ -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:

0 comments on commit 1062426

Please sign in to comment.