Merge pull request #467 from nilxam/improve_check_goodrepo
Improve check goodrepo
This commit is contained in:
commit
7e1a31a95e
@ -45,8 +45,8 @@ def _check_repo_download(self, request):
|
||||
toignore = set()
|
||||
request.downloads = defaultdict(list)
|
||||
|
||||
# return if no goodrepos
|
||||
if not request.goodrepos:
|
||||
# do not check package lists if the repository was excluded
|
||||
if request.build_excluded:
|
||||
return set()
|
||||
|
||||
# XXX TODO - Rewrite the logic here, meanwhile set is to x86_64
|
||||
@ -412,6 +412,11 @@ def _check_repo_group(self, id_, requests, skip_cycle=None, debug=False):
|
||||
for rq in requests:
|
||||
if updated.get(rq.request_id, False) or rq.updated:
|
||||
continue
|
||||
if not hasattr(rq, 'goodrepo'):
|
||||
msg = 'Can not find a good repo for %s' % rq.str_compact()
|
||||
print 'NOT ACCEPTED - ', msg
|
||||
print 'Perhaps this request is not against i586/x86_64 build or i586 build only. For human to check!'
|
||||
continue
|
||||
msg = 'Builds for repo %s' % rq.goodrepo
|
||||
print 'ACCEPTED', msg
|
||||
self.checkrepo.change_review_state(rq.request_id, 'accepted', message=msg)
|
||||
|
@ -63,6 +63,7 @@ class Request(object):
|
||||
|
||||
self.updated = False
|
||||
self.error = None
|
||||
self.build_excluded = False
|
||||
self.action_type = 'submit' # assume default
|
||||
self.downloads = []
|
||||
self.is_shadow_devel = False
|
||||
@ -545,8 +546,21 @@ class CheckRepo(object):
|
||||
|
||||
root = ET.fromstring(root_xml)
|
||||
for repo in root.findall('repository'):
|
||||
intel_archs = [a for a in repo.findall('arch')
|
||||
if a.attrib['arch'] in ('i586', 'x86_64')]
|
||||
valid_intel_repo = True
|
||||
intel_archs = []
|
||||
|
||||
for a in repo.findall('arch'):
|
||||
if a.attrib['arch'] not in ('i586', 'x86_64'):
|
||||
# It is not a common Factory i586/x86_64 build repository
|
||||
# probably builds on ARM, PPC or images
|
||||
valid_intel_repo = False
|
||||
else:
|
||||
# We assume it is standard Factory i586/x86_64 build repository
|
||||
intel_archs.append(a)
|
||||
|
||||
if not valid_intel_repo:
|
||||
continue
|
||||
|
||||
if len(intel_archs) == 2:
|
||||
repos_to_check.append(repo)
|
||||
|
||||
@ -750,10 +764,7 @@ class CheckRepo(object):
|
||||
if arch.attrib['arch'] not in ('i586', 'x86_64'):
|
||||
continue
|
||||
if arch.attrib['result'] == 'excluded' and arch.attrib['arch'] == 'x86_64':
|
||||
# Just do not check the excluded repository
|
||||
# and marked the repository is not good
|
||||
isgood = False
|
||||
continue
|
||||
request.build_excluded = True
|
||||
if 'missing' in arch.attrib:
|
||||
for package in arch.attrib['missing'].split(','):
|
||||
if not self.is_binary(
|
||||
|
Loading…
x
Reference in New Issue
Block a user