mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-05 19:00:56 +01:00
fix output of 'osc buildinfo' if parameter are missing
Fixed output of 'osc buildinfo' if parameter are missing due to change from commit cb1880762279fdc920d7e04a17bda7a389c766e3. Show only the available repos (and not the arch) if called from a checked out package.
This commit is contained in:
parent
57881f31a1
commit
f2788628c6
@ -3417,7 +3417,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
print_buildlog(apiurl, project, package, repository, arch, offset)
|
print_buildlog(apiurl, project, package, repository, arch, offset)
|
||||||
|
|
||||||
|
|
||||||
def print_repos(self):
|
def print_repos(self, repos_only=False):
|
||||||
wd = os.curdir
|
wd = os.curdir
|
||||||
doprint = False
|
doprint = False
|
||||||
if is_package_dir(wd):
|
if is_package_dir(wd):
|
||||||
@ -3430,6 +3430,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
if doprint:
|
if doprint:
|
||||||
print 'Valid arguments for this %s are:' % str
|
print 'Valid arguments for this %s are:' % str
|
||||||
print
|
print
|
||||||
|
if repos_only:
|
||||||
|
self.do_repositories("repos_only", None)
|
||||||
|
else:
|
||||||
self.do_repositories(None, None)
|
self.do_repositories(None, None)
|
||||||
raise oscerr.WrongArgs('Missing arguments')
|
raise oscerr.WrongArgs('Missing arguments')
|
||||||
|
|
||||||
@ -3753,7 +3756,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
args = slash_split(args)
|
args = slash_split(args)
|
||||||
|
|
||||||
if len(args) < 1 and (is_package_dir('.') or is_project_dir('.')):
|
if len(args) < 1 and (is_package_dir('.') or is_project_dir('.')):
|
||||||
self.print_repos()
|
self.print_repos(True)
|
||||||
|
|
||||||
if len(args) > 2:
|
if len(args) > 2:
|
||||||
raise oscerr.WrongArgs('Too many arguments.')
|
raise oscerr.WrongArgs('Too many arguments.')
|
||||||
@ -3761,6 +3764,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
apiurl = self.get_api_url()
|
apiurl = self.get_api_url()
|
||||||
|
|
||||||
if len(args) == 1:
|
if len(args) == 1:
|
||||||
|
#FIXME: check if args[0] is really a repo and not a project, need a is_project() function for this
|
||||||
project = store_read_project(wd)
|
project = store_read_project(wd)
|
||||||
repository = args[0]
|
repository = args[0]
|
||||||
elif len(args) == 2:
|
elif len(args) == 2:
|
||||||
@ -3810,6 +3814,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
if package is not None:
|
if package is not None:
|
||||||
disabled = show_package_disabled_repos(apiurl, project, package)
|
disabled = show_package_disabled_repos(apiurl, project, package)
|
||||||
|
|
||||||
|
if subcmd == 'repos_only':
|
||||||
|
for repo in get_repositories_of_project(apiurl, project):
|
||||||
|
if (disabled is None) or ((disabled is not None) and (repo not in disabled)):
|
||||||
|
print repo
|
||||||
|
else:
|
||||||
data = []
|
data = []
|
||||||
for repo in get_repos_of_project(apiurl, project):
|
for repo in get_repos_of_project(apiurl, project):
|
||||||
if (disabled is None) or ((disabled is not None) and (repo.name not in disabled)):
|
if (disabled is None) or ((disabled is not None) and (repo.name not in disabled)):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user