Skip to content

Commit

Permalink
support single binary download via getbinaries command
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Nov 19, 2012
1 parent 52e2775 commit 7353cf9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions 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
Expand Down
10 changes: 8 additions & 2 deletions osc/commandline.py
Expand Up @@ -5693,24 +5693,28 @@ def do_getbinaries(self, subcmd, opts, *args):
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)
Expand Down Expand Up @@ -5755,6 +5759,8 @@ def do_getbinaries(self, subcmd, opts, *args):
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
Expand Down

0 comments on commit 7353cf9

Please sign in to comment.