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"):
latestBuild = self.newerBuild(build, tag)
if latestBuild != None:
build.substitute = latestBuild.nvr
--
1.7.7.6