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

added 'bse' as a shortcur for 'search --binary'

This commit is contained in:
Juergen Weigert 2010-03-20 12:27:27 +01:00
parent fd3d0685a2
commit ad5b23d975
3 changed files with 9 additions and 6 deletions

1
TODO
View File

@ -12,6 +12,7 @@ CRITICAL:
apiurl/source/prj/pkg
The current working directory or its descendants should provide defaults
for apiurl, prj and/or pkg.
See also http://en.opensuse.org/Build_Service/Concepts/OscProjPack
MAJOR:

View File

@ -3988,6 +3988,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='search packages built for PROJECT (implies --binary)')
@cmdln.alias('sm')
@cmdln.alias('se')
@cmdln.alias('bse')
def do_search(self, subcmd, opts, search_term):
"""${cmd_name}: Search for a project and/or package.
@ -3997,7 +3998,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
usage:
osc search \'search term\' <options>
osc sm \'source package name\'
osc sm \'source package name\' ('osc search --maintained')
osc bse ... ('osc search --binary')
osc se ...
${cmd_option_list}
"""
@ -4021,7 +4023,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
opts.package = True
if not opts.substring:
opts.exact = True
if opts.baseproject:
if subcmd == 'bse' or opts.baseproject:
opts.binary = True
if opts.binary and (opts.title or opts.description or opts.involved or opts.bugowner or opts.maintainer

View File

@ -2632,9 +2632,9 @@ def get_user_projpkgs_request_list(apiurl, user, req_state=('new',), req_type=No
"""Return all new requests for all projects/packages where is user is involved"""
if not projpkgs:
res = get_user_projpkgs(apiurl, user, exclude_projects=exclude_projects)
for i in res['project_id'].findall('project'):
for i in res['project'].findall('project'):
projpkgs[i.get('name')] = []
for i in res['package_id'].findall('package'):
for i in res['package'].findall('package'):
if not i.get('project') in projpkgs.keys():
projpkgs.setdefault(i.get('project'), []).append(i.get('name'))
xpath = ''
@ -4683,9 +4683,9 @@ def get_user_projpkgs(apiurl, user, role=None, exclude_projects=[], proj=True, p
xpath_prj = xpath_join(xpath, excl_prj, op='and')
what = {}
if pkg:
what['package_id'] = xpath_pkg
what['package'] = xpath_pkg
if proj:
what['project_id'] = xpath_prj
what['project'] = xpath_prj
try:
res = search(apiurl, **what)
except urllib2.HTTPError, e: