koji wait-repo patch
Hi, I've been bitten a few times running "koji wait-repo" that the build I'm waiting on isn't actually tagged in the right place to get included in the repo. (Or is blocked, or is typoed etc). I think koji wait-repo T --build X should actually check that X is the latest build in T, and warn you if it's not. (Warn not abort in case you're being clever and running wait-repo at the same time as you build the package) Here's a patch:
This commit is contained in:
parent
4dc1a7da82
commit
30e8e826f7
1 changed files with 10 additions and 0 deletions
10
cli/koji
10
cli/koji
|
|
@ -6003,6 +6003,16 @@ def anon_handle_wait_repo(options, session, args):
|
|||
return 1
|
||||
tag_id = tag_info['id']
|
||||
|
||||
|
||||
for nvr in builds:
|
||||
data = session.getLatestBuilds(tag_id, package=nvr["name"])
|
||||
if len(data) == 0:
|
||||
print "Warning: package %s is not in tag %s" % (nvr["name"], tag)
|
||||
else:
|
||||
present_nvr = [x["nvr"] for x in data][0]
|
||||
if present_nvr != "%s-%s-%s" % (nvr["name"], nvr["version"], nvr["release"]):
|
||||
print "Warning: nvr %s-%s-%s is not current in tag %s\n latest build in %s is %s" % (nvr["name"], nvr["version"], nvr["release"], tag, tag, present_nvr)
|
||||
|
||||
last_repo = None
|
||||
repo = session.getRepo(tag_id)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue