From ee8b2d91c7f0a5256dac88f91165dd327f5a2082 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Jan 27 2021 18:40:48 +0000 Subject: Provide a little more info on 'koji buildinfo' output Various scripts and local tools can use the Koji output here and get the already split out name, version, release, and epoch values. Useful in CI environments. Signed-off-by: David Cantrell --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 1eec550..bebd34b 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -3230,6 +3230,12 @@ def anon_handle_buildinfo(goptions, session, args): info['arch'] = 'src' info['state'] = koji.BUILD_STATES[info['state']] print("BUILD: %(name)s-%(version)s-%(release)s [%(id)d]" % info) + print("Name: %(name)s" % info) + print("Version: %(version)s" % info) + print("Release: %(release)s" % info) + epoch = info.get('epoch') + if epoch is not None: + print("Epoch: %s" % epoch) print("State: %(state)s" % info) if info['state'] == 'BUILDING': print("Reserved by: %(cg_name)s" % info)