cli: fix wait-repo message when missing builds

The wait-repo command performs a sanity-check when the user specifies an
NVR with "--build". If there are no builds of the package in the tag at
all, wait-repo will print a warning.

The text of that warning was not accurate. The package itself may be in
the tag (listPackages), but there are no builds of that package
(getLatestBuilds). Correct the warning text to clarify the exact problem
to the user.
This commit is contained in:
Ken Dreyer 2023-09-28 12:03:57 -04:00
parent 1310f22b80
commit cb244fb382

View file

@ -7220,7 +7220,7 @@ def anon_handle_wait_repo(options, session, args):
for nvr in builds:
data = session.getLatestBuilds(tag_id, package=nvr["name"])
if len(data) == 0:
warn("Package %s is not in tag %s" % (nvr["name"], tag))
warn("No %s builds in tag %s" % (nvr["name"], tag))
else:
present_nvr = [x["nvr"] for x in data][0]
expected_nvr = '%(name)s-%(version)s-%(release)s' % nvr