diff --git a/NEWS b/NEWS index a0154c0c..3e0724d5 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ 0.137 - support delete requests for repositories. + - support single binary download via getbinaries command 0.136 - prefer TLS v1.1 or v1.2 if available diff --git a/osc/commandline.py b/osc/commandline.py index 4367d8b7..87cfb68c 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -5693,24 +5693,28 @@ Please submit there instead, or use --nodevelproject to force direct submission. osc getbinaries REPOSITORY # works in checked out project/package (check out all archs in subdirs) osc getbinaries REPOSITORY ARCHITECTURE # works in checked out project/package osc getbinaries PROJECT PACKAGE REPOSITORY ARCHITECTURE + osc getbinaries PROJECT PACKAGE REPOSITORY ARCHITECTURE FILE ${cmd_option_list} """ args = slash_split(args) apiurl = self.get_api_url() - package = None project = None + package = None + binary = None if len(args) < 1 and is_package_dir('.'): self.print_repos() architecture = None - if len(args) == 4: + if len(args) == 4 or len(args) == 5: project = args[0] package = args[1] repository = args[2] architecture = args[3] + if len(args) == 5: + binary = args[4] elif len(args) >= 1 and len(args) <= 2: if is_package_dir(os.getcwd()): project = store_read_project(os.curdir) @@ -5755,6 +5759,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. continue for i in binaries: + if binary != None and binary != i.name: + continue # skip source rpms if not opts.sources and i.name.endswith('src.rpm'): continue