mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-29 19:26:14 +01:00
Merge branch 'fix_#351' of https://github.com/lethliel/osc
Fix logic for finding disabled repos in do_repositories. Fixes: #351 ("Not all options for osc getbinaries is listed")
This commit is contained in:
commit
0f9ab38948
@ -5846,12 +5846,16 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
|
|
||||||
if subcmd == 'repos_only':
|
if subcmd == 'repos_only':
|
||||||
for repo in get_repositories_of_project(apiurl, project):
|
for repo in get_repositories_of_project(apiurl, project):
|
||||||
if (disabled is None) or ((disabled is not None) and (repo not in disabled)):
|
if (disabled is None) or ((disabled is not None) and (repo not in [d['repo'] for d in disabled])):
|
||||||
print(repo)
|
print(repo)
|
||||||
else:
|
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 not None:
|
||||||
|
if ({'repo': repo.name, 'arch': repo.arch} in disabled
|
||||||
|
or repo.name in [d['repo'] for d in disabled if d['arch'] is None]
|
||||||
|
or repo.arch in [d['arch'] for d in disabled if d['repo'] is None]):
|
||||||
|
continue
|
||||||
data += [repo.name, repo.arch]
|
data += [repo.name, repo.arch]
|
||||||
|
|
||||||
for row in build_table(2, data, width=2):
|
for row in build_table(2, data, width=2):
|
||||||
|
@ -3554,7 +3554,12 @@ def show_package_disabled_repos(apiurl, prj, pac):
|
|||||||
try:
|
try:
|
||||||
root = ET.fromstring(''.join(m))
|
root = ET.fromstring(''.join(m))
|
||||||
elm = root.find('build')
|
elm = root.find('build')
|
||||||
r = [ node.get('repository') for node in elm.findall('disable')]
|
r = []
|
||||||
|
for node in elm.findall('disable'):
|
||||||
|
repo = node.get('repository')
|
||||||
|
arch = node.get('arch')
|
||||||
|
dis_r = {'repo': repo, 'arch': arch}
|
||||||
|
r.append(dis_r)
|
||||||
return r
|
return r
|
||||||
except:
|
except:
|
||||||
return None
|
return None
|
||||||
@ -7182,7 +7187,7 @@ def request_interactive_review(apiurl, request, initial_cmd='', group=None,
|
|||||||
print('Type %s:' % action.type)
|
print('Type %s:' % action.type)
|
||||||
disabled = show_package_disabled_repos(apiurl, action.src_project, action.src_package)
|
disabled = show_package_disabled_repos(apiurl, action.src_project, action.src_package)
|
||||||
for repo in get_repos_of_project(apiurl, action.src_project):
|
for repo in get_repos_of_project(apiurl, action.src_project):
|
||||||
if disabled is None or repo.name not in disabled:
|
if (disabled is None) or (repo.name not in [d['repo'] for d in disabled]):
|
||||||
lintlog_entry = {
|
lintlog_entry = {
|
||||||
'proj': action.src_project,
|
'proj': action.src_project,
|
||||||
'pkg': action.src_package,
|
'pkg': action.src_package,
|
||||||
|
Loading…
Reference in New Issue
Block a user