1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-23 05:26:16 +01:00

Merge commit 'refs/merge-requests/7' of git://gitorious.org/opensuse/osc into integration

This commit is contained in:
Sascha Peilicke 2010-10-04 15:04:04 +02:00
commit 53813ff15a

View File

@ -3831,10 +3831,13 @@ Please submit there instead, or use --nodevelproject to force direct submission.
The returned data is XML and contains a list of the packages used in The returned data is XML and contains a list of the packages used in
building, their source, and the expanded BuildRequires. building, their source, and the expanded BuildRequires.
The arguments REPOSITORY and ARCH can be taken from the first two columns The arguments REPOSITORY and ARCH are optional. They can be taken from
of the 'osc repos' output. the first two columns of the 'osc repos' output. If not specified,
REPOSITORY defaults to the 'build_repositoy' config entry in your '.oscrc'
and ARCH defaults to your host architecture.
usage: usage:
osc buildinfo [BUILD_DESCR] (in pkg dir)
osc buildinfo REPOSITORY ARCH [BUILD_DESCR] (in pkg dir) osc buildinfo REPOSITORY ARCH [BUILD_DESCR] (in pkg dir)
osc buildinfo PROJECT PACKAGE REPOSITORY ARCH [BUILD_DESCR] osc buildinfo PROJECT PACKAGE REPOSITORY ARCH [BUILD_DESCR]
@ -3843,21 +3846,18 @@ Please submit there instead, or use --nodevelproject to force direct submission.
wd = os.curdir wd = os.curdir
args = slash_split(args) args = slash_split(args)
if len(args) < 2 and is_package_dir('.'): if (len(args) == 0 or len(args) == 1) and is_package_dir('.'):
self.print_repos() package = store_read_package(wd)
project = store_read_project(wd)
if len(args) > 5: repository = conf.config['build_repository']
raise oscerr.WrongArgs('Too many arguments.') import osc.build
arch = osc.build.hostarch
apiurl = self.get_api_url() elif len(args) == 2 or len(args) == 3:
if len(args) < 4: # 2 or 3
package = store_read_package(wd) package = store_read_package(wd)
project = store_read_project(wd) project = store_read_project(wd)
repository = args[0] repository = args[0]
arch = args[1] arch = args[1]
elif len(args) == 4 or len(args) == 5:
if len(args) > 3 and len(args) < 6: # 4 or 5
project = args[0] project = args[0]
package = args[1] package = args[1]
repository = args[2] repository = args[2]
@ -3865,10 +3865,15 @@ Please submit there instead, or use --nodevelproject to force direct submission.
# for following specfile detection ... # for following specfile detection ...
del args[0] del args[0]
del args[0] del args[0]
else:
raise oscerr.WrongArgs('Too many arguments.')
apiurl = self.get_api_url()
build_descr_data = None build_descr_data = None
if len(args) == 3: if len(args) % 2 == 1: # odd number of args, means last is BUILD_DESCR
build_descr_data = open(args[2]).read() with open(args[len(args) - 1]) as f:
build_descr_data = f.read()
if opts.prefer_pkgs and build_descr_data is None: if opts.prefer_pkgs and build_descr_data is None:
raise oscerr.WrongArgs('error: a build description is needed if \'--prefer-pkgs\' is used') raise oscerr.WrongArgs('error: a build description is needed if \'--prefer-pkgs\' is used')
elif opts.prefer_pkgs: elif opts.prefer_pkgs: