From 5df0317d4e82207223feee8a2932b4617e6ca243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Sat, 27 Oct 2012 15:38:42 +0200 Subject: [PATCH] don't replace existing build when running with prefer-new 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/koji-shadow b/util/koji-shadow index 12b0bc3c..d00041d2 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"): latestBuild = self.newerBuild(build, tag) if latestBuild != None: build.substitute = latestBuild.nvr