mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-12 23:56:13 +01:00
support package search with project results needed for maintained search.
This is for sure not nice, but fixes #583570 for now. (we need really to re-think the osc search implementation)
This commit is contained in:
parent
8e7a171cf2
commit
f9aa6c7271
2
NEWS
2
NEWS
@ -7,6 +7,8 @@
|
||||
- Allow --prefer-pkgs to parse repodata
|
||||
- new "osc build --no-service" option to skip source service update
|
||||
- fix linktobranch apiurl usage
|
||||
- "maintained package" search is telling relevant projects now
|
||||
* requires OBS 1.7.2 or 2.0
|
||||
|
||||
0.125
|
||||
- add "osc pull" command to fetch and merge changes in the link target
|
||||
|
@ -4108,17 +4108,18 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
if subcmd == 'sm' or opts.maintained:
|
||||
opts.bugowner = True
|
||||
opts.package = True
|
||||
opts.project = True
|
||||
opts.limit_to_attribute = conf.config['maintained_attribute']
|
||||
if opts.title:
|
||||
search_list.append('title')
|
||||
if opts.description:
|
||||
search_list.append('description')
|
||||
if opts.package:
|
||||
search_list.append('@name')
|
||||
search_for.append('package')
|
||||
if opts.project:
|
||||
search_list.append('@name')
|
||||
search_for.append('project')
|
||||
if opts.package:
|
||||
search_list.append('@name')
|
||||
search_for.append('package')
|
||||
if opts.limit_to_attribute:
|
||||
extra_limiter='attribute/@name="%s"' % (opts.limit_to_attribute)
|
||||
if not opts.substring:
|
||||
@ -4138,7 +4139,16 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
search_list = ['title', 'description', '@name']
|
||||
if not search_for:
|
||||
search_for = [ 'project', 'package' ]
|
||||
|
||||
for kind in search_for:
|
||||
# special mode only for maintainted search, search for projects based on package names
|
||||
if subcmd == 'sm' or opts.maintained:
|
||||
if kind == 'project':
|
||||
search_list.append('package/@name')
|
||||
else:
|
||||
search_list.remove('package/@name')
|
||||
search_list.append('@name')
|
||||
|
||||
result = search(conf.config['apiurl'], set(search_list), kind, search_term, opts.verbose, opts.exact, opts.repos_baseurl, role_filter, extra_limiter)
|
||||
|
||||
if not result:
|
||||
|
Loading…
Reference in New Issue
Block a user