Add a new check. When the SPEC file is different from the package name.
This commit is contained in:
parent
a65f4d5844
commit
8acd18874f
@ -205,7 +205,7 @@ def _check_repo_group(self, id_, requests):
|
||||
|
||||
execution_plan = defaultdict(list)
|
||||
|
||||
DEBUG_PLAN = 1
|
||||
DEBUG_PLAN = 0
|
||||
|
||||
# Get all the (project, repo, disturl) where the disturl is
|
||||
# compatible with the request. For the same package we can have
|
||||
|
@ -407,8 +407,18 @@ class CheckRepo(object):
|
||||
specs = [en.attrib['name'][:-5] for en in root.findall('entry')
|
||||
if en.attrib['name'].endswith('.spec')]
|
||||
|
||||
# source checker validated it exists
|
||||
specs.remove(rq.src_package)
|
||||
# source checker already validated it
|
||||
if rq.src_package in specs:
|
||||
specs.remove(rq.src_package)
|
||||
elif rq.tgt_package in specs:
|
||||
specs.remove(rq.tgt_package)
|
||||
else:
|
||||
msg = 'The name of the SPEC files %s do not match with the name of the package (%s)'
|
||||
msg = msg % (specs, rq.src_package)
|
||||
print('DECLINED', msg)
|
||||
self.change_review_state(request_id, 'declined', message=msg)
|
||||
rq.updated = True
|
||||
return requests
|
||||
|
||||
# Makes sure that the .spec file builds properly.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user