mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-12 23:56:13 +01:00
make getbinaries working in checked out directories
This commit is contained in:
parent
13ef702466
commit
b8642c4ee0
1
NEWS
1
NEWS
@ -2,6 +2,7 @@
|
||||
- support checkout of single package via "osc co PACKAGE" when local dir is project
|
||||
- allow to specify target project and package on osc branch (requires server version 1.6)
|
||||
- add option to automatic checkout a branched package
|
||||
- support "osc getbinaries" in checkout packages
|
||||
- new vc command for editing the changes files (requires build.rpm 2009.04.17 or newest)
|
||||
|
||||
0.116:
|
||||
|
@ -2317,19 +2317,42 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
help='destination directory')
|
||||
@cmdln.option('--sources', action="store_true",
|
||||
help='also fetch source packages')
|
||||
def do_getbinaries(self, subcmd, opts, project, package, repository, architecture):
|
||||
def do_getbinaries(self, subcmd, opts, *args):
|
||||
"""${cmd_name}: Download binaries to a local directory
|
||||
|
||||
This command downloads packages directly from the api server.
|
||||
Thus, it directly accesses the packages that are used for building
|
||||
others even when they are not "published" yet.
|
||||
|
||||
${cmd_usage}
|
||||
usage:
|
||||
osc getbinaries REPOSITORY ARCHITECTURE # works in checked out package
|
||||
osc getbinaries PROJECT PACKAGE REPOSITORY ARCHITECTURE
|
||||
${cmd_option_list}
|
||||
"""
|
||||
|
||||
args = slash_split(args)
|
||||
apiurl = conf.config['apiurl']
|
||||
|
||||
if len(args) == 4:
|
||||
project = args[0]
|
||||
package = args[1]
|
||||
repository = args[2]
|
||||
architecture = args[3]
|
||||
elif len(args) == 2:
|
||||
if is_package_dir(os.getcwd()):
|
||||
project = Project(os.getcwd()).name
|
||||
p = Package(os.getcwd())
|
||||
package = p.name
|
||||
apiurl = p.apiurl
|
||||
repository = args[0]
|
||||
architecture = args[1]
|
||||
else:
|
||||
sys.exit('Local directory is no checkout package, neither it is specified. ' )
|
||||
else:
|
||||
sys.exit('Need either 2 or 4 arguments.' )
|
||||
|
||||
# Get package list
|
||||
binaries = get_binarylist(conf.config['apiurl'],
|
||||
binaries = get_binarylist(apiurl,
|
||||
project, repository, architecture,
|
||||
package = package, verbose=True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user