Merge pull request #1911 from jberry-suse/origin-manager-misc
origin-manager: miscellaneous improvements.
This commit is contained in:
commit
07dc46fade
@ -119,7 +119,7 @@ def osrt_origin_list(apiurl, opts, *args):
|
||||
line_format = '{:<' + str(osrt_origin_max_key(lookup, 7)) + '} {}'
|
||||
print(line_format.format('package', 'origin'))
|
||||
|
||||
for package, origin in lookup.items():
|
||||
for package, origin in sorted(lookup.items()):
|
||||
print(line_format.format(package, origin))
|
||||
|
||||
def osrt_origin_package(apiurl, opts, *packages):
|
||||
|
@ -526,7 +526,8 @@ def package_source_hash(apiurl, project, package, revision=None):
|
||||
url = makeurl(apiurl, ['source', project, package], query)
|
||||
root = ETL.parse(http_GET(url)).getroot()
|
||||
except HTTPError as e:
|
||||
if e.code == 404:
|
||||
if e.code == 400 or e.code == 404:
|
||||
# 400: revision not found, 404: package not found.
|
||||
return None
|
||||
|
||||
raise e
|
||||
|
@ -417,7 +417,7 @@ def policy_input_evaluate(policy, inputs):
|
||||
|
||||
if inputs['new_package']:
|
||||
if policy['maintainer_review_initial']:
|
||||
result.reviews['maintainer'] = 'Need package maintainer approval for inital submission.'
|
||||
result.reviews['maintainer'] = 'Need package maintainer approval for initial submission.'
|
||||
|
||||
if not inputs['from_highest_priority']:
|
||||
result.reviews['fallback'] = 'Not from the highest priority origin which provides the package.'
|
||||
@ -459,7 +459,8 @@ def policy_input_evaluate(policy, inputs):
|
||||
result.reviews['maintainer'] = 'Need package maintainer approval.'
|
||||
|
||||
for additional_review in policy['additional_reviews']:
|
||||
result.reviews[additional_review] = 'Additional review required based on origin.'
|
||||
if additional_review not in result.reviews:
|
||||
result.reviews[additional_review] = 'Additional review required based on origin.'
|
||||
|
||||
return result
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user