[PATCH 2/2] support latest=N api option in cli

Ralph Bean rbean at redhat.com
Fri Feb 20 19:09:05 UTC 2015


On Fri, Feb 20, 2015 at 12:23:12PM -0500, Mike McLean wrote:
> ---
>  cli/koji | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/cli/koji b/cli/koji
> index f0f5f51..9f5c5b1 100755
> --- a/cli/koji
> +++ b/cli/koji
> @@ -2578,6 +2578,7 @@ def anon_handle_list_tagged(options, session, args):
>      parser.add_option("--rpms", action="store_true", help=_("Show rpms instead of builds"))
>      parser.add_option("--inherit", action="store_true", help=_("Follow inheritance"))
>      parser.add_option("--latest", action="store_true", help=_("Only show the latest builds/rpms"))
> +    parser.add_option("--latest-n", type='int', metavar="N", help=_("Only show the latest N builds/rpms"))
>      parser.add_option("--quiet", action="store_true", help=_("Do not print the header information"), default=options.quiet)
>      parser.add_option("--paths", action="store_true", help=_("Show the file paths"))
>      parser.add_option("--sigs", action="store_true", help=_("Show signatures"))
> @@ -2601,6 +2602,8 @@ def anon_handle_list_tagged(options, session, args):
>      opts = {}
>      for key in ('latest','inherit'):
>          opts[key] = getattr(options, key)
> +    if options.latest_n is not None:
> +        opts['latest'] = options.latest_n
>      if package:
>          opts['package'] = package
>      if options.arch:
> -- 
> 1.9.3
> 
> --
> buildsys mailing list
> buildsys at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/buildsys

Looks good!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/buildsys/attachments/20150220/d0fd3070/attachment.sig>


More information about the buildsys mailing list