1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

support the ls expand option also for projects

packages of linked projects can be listed using the expand option
This commit is contained in:
Ludwig Nussel 2014-08-11 16:59:40 +02:00
parent 902adde28b
commit 1b6e2ac745
2 changed files with 4 additions and 4 deletions

View File

@ -397,9 +397,7 @@ class Osc(cmdln.Cmdln):
if opts.verbose: if opts.verbose:
if self.options.verbose: if self.options.verbose:
print('Sorry, the --verbose option is not implemented for projects.', file=sys.stderr) print('Sorry, the --verbose option is not implemented for projects.', file=sys.stderr)
if opts.expand: for pkg in meta_get_packagelist(apiurl, project, deleted = opts.deleted, expand = opts.expand):
raise oscerr.WrongOptions('Sorry, the --expand option is not implemented for projects.')
for pkg in meta_get_packagelist(apiurl, project, opts.deleted):
print(pkg) print(pkg)
elif len(args) == 2 or len(args) == 3: elif len(args) == 2 or len(args) == 3:

View File

@ -3179,11 +3179,13 @@ def check_store_version(dir):
raise oscerr.WorkingCopyWrongVersion(msg) raise oscerr.WorkingCopyWrongVersion(msg)
def meta_get_packagelist(apiurl, prj, deleted=None): def meta_get_packagelist(apiurl, prj, deleted=None, expand=False):
query = {} query = {}
if deleted: if deleted:
query['deleted'] = 1 query['deleted'] = 1
if expand:
query['expand'] = 1
u = makeurl(apiurl, ['source', prj], query) u = makeurl(apiurl, ['source', prj], query)
f = http_GET(u) f = http_GET(u)