1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-11 16:36:14 +01:00

support single binary download via getbinaries command

This commit is contained in:
Adrian Schröter 2012-11-19 10:21:24 +01:00
parent 52e27750e4
commit 7353cf99d7
2 changed files with 9 additions and 2 deletions

1
NEWS
View File

@ -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

View File

@ -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