CLI update for readTagGroups blocked
This commit is contained in:
parent
90a935182f
commit
399e42bbd1
2 changed files with 11 additions and 3 deletions
|
|
@ -2563,7 +2563,10 @@ def print_group_list_req_group(group):
|
|||
|
||||
|
||||
def print_group_list_req_package(pkg):
|
||||
print(" %(package)s: %(basearchonly)s, %(type)s [%(tag_name)s]" % pkg)
|
||||
fmt = " %(package)s: %(basearchonly)s, %(type)s [%(tag_name)s]"
|
||||
if pkg['blocked']:
|
||||
fmt += " [BLOCKED]"
|
||||
print(fmt % pkg)
|
||||
|
||||
|
||||
def anon_handle_list_groups(goptions, session, args):
|
||||
|
|
@ -2574,11 +2577,12 @@ def anon_handle_list_groups(goptions, session, args):
|
|||
parser.add_option("--event", type='int', metavar="EVENT#", help=_("query at event"))
|
||||
parser.add_option("--ts", type='int', metavar="TIMESTAMP", help=_("query at timestamp"))
|
||||
parser.add_option("--repo", type='int', metavar="REPO#", help=_("query at event for a repo"))
|
||||
parser.add_option("--show-blocked", action="store_true", dest="incl_blocked", help=_("Show blocked packages"))
|
||||
(options, args) = parser.parse_args(args)
|
||||
if len(args) < 1 or len(args) > 2:
|
||||
parser.error(_("Incorrect number of arguments"))
|
||||
assert False # pragma: no cover
|
||||
opts = {}
|
||||
opts = {'incl_blocked': options.incl_blocked}
|
||||
activate_session(session, goptions)
|
||||
event = koji.util.eventFromOpts(session, options)
|
||||
if event:
|
||||
|
|
@ -5089,13 +5093,16 @@ def anon_handle_show_groups(goptions, session, args):
|
|||
parser.add_option("-x", "--expand", action="store_true", default=False,
|
||||
help=_("Expand groups in comps format"))
|
||||
parser.add_option("--spec", action="store_true", help=_("Print build spec"))
|
||||
parser.add_option("--show-blocked", action="store_true", dest="incl_blocked", help=_("Show blocked packages"))
|
||||
(options, args) = parser.parse_args(args)
|
||||
if len(args) != 1:
|
||||
parser.error(_("Incorrect number of arguments"))
|
||||
assert False # pragma: no cover
|
||||
if options.incl_blocked and (options.comps or options.spec):
|
||||
parser.error(_("--show-blocked doesn't make sense for comps/spec output"))
|
||||
activate_session(session, goptions)
|
||||
tag = args[0]
|
||||
groups = session.getTagGroups(tag)
|
||||
groups = session.getTagGroups(tag, incl_blocked=options.incl_blocked)
|
||||
if options.comps:
|
||||
print(koji.generate_comps(groups, expand_groups=options.expand))
|
||||
elif options.spec:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue