[koji PATCH 1/4] don't replace existing build when running with prefer-new

Dan Horák dan at danny.cz
Tue Nov 6 14:21:01 UTC 2012


Dan Horák píše v So 27. 10. 2012 v 15:38 +0200: 
> Only try to replace a build with newer one when the required one is missing.
> It also means the buildroot will be closer to the one in primary.
> ---
>  util/koji-shadow |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/util/koji-shadow b/util/koji-shadow
> index 6d844b3..89a67d5 100755
> --- a/util/koji-shadow
> +++ b/util/koji-shadow
> @@ -730,7 +730,7 @@ class BuildTracker(object):
>                  if depth > 0:
>                      print "%sDep replaced: %s->%s" % (head, build.nvr, replace)
>                      return build
> -            if options.prefer_new and not options.build:
> +            if options.prefer_new and not (options.build or build.state == "common"):

hm, maybe we should prefer the newer build only when the build failed or
was canceled in secondary koji

> latestBuild = self.newerBuild(build, tag)
>                  if latestBuild != None:
>                      build.substitute = latestBuild.nvr


Dan




More information about the buildsys mailing list