Merge pull request #465 from nilxam/care_more_excluded_repo
Do not count excluded repository as good repo
This commit is contained in:
commit
56863b561b
@ -45,9 +45,11 @@ def _check_repo_download(self, request):
|
|||||||
toignore = set()
|
toignore = set()
|
||||||
request.downloads = defaultdict(list)
|
request.downloads = defaultdict(list)
|
||||||
|
|
||||||
# XXX TODO - Rewrite the logic here, meanwhile set is to x86_64
|
# return if no goodrepos
|
||||||
if request.build_excluded:
|
if not request.goodrepos:
|
||||||
return set()
|
return set()
|
||||||
|
|
||||||
|
# XXX TODO - Rewrite the logic here, meanwhile set is to x86_64
|
||||||
arch = 'x86_64'
|
arch = 'x86_64'
|
||||||
# if not request.build_excluded:
|
# if not request.build_excluded:
|
||||||
# arch = 'x86_64'
|
# arch = 'x86_64'
|
||||||
@ -118,7 +120,7 @@ def _check_repo_group(self, id_, requests, skip_cycle=None, debug=False):
|
|||||||
# XXX TODO - If the requests comes from command line, the group is
|
# XXX TODO - If the requests comes from command line, the group is
|
||||||
# still not there.
|
# still not there.
|
||||||
|
|
||||||
# Do not continue if any of the packages do not successfully buid.
|
# Do not continue if any of the packages do not successfully build.
|
||||||
if not all(self.checkrepo.is_buildsuccess(r) for r in requests if r.action_type != 'delete'):
|
if not all(self.checkrepo.is_buildsuccess(r) for r in requests if r.action_type != 'delete'):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -63,7 +63,6 @@ class Request(object):
|
|||||||
|
|
||||||
self.updated = False
|
self.updated = False
|
||||||
self.error = None
|
self.error = None
|
||||||
self.build_excluded = False
|
|
||||||
self.action_type = 'submit' # assume default
|
self.action_type = 'submit' # assume default
|
||||||
self.downloads = []
|
self.downloads = []
|
||||||
self.is_shadow_devel = False
|
self.is_shadow_devel = False
|
||||||
@ -750,6 +749,11 @@ class CheckRepo(object):
|
|||||||
for arch in repository.findall('arch'):
|
for arch in repository.findall('arch'):
|
||||||
if arch.attrib['arch'] not in ('i586', 'x86_64'):
|
if arch.attrib['arch'] not in ('i586', 'x86_64'):
|
||||||
continue
|
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
|
||||||
if 'missing' in arch.attrib:
|
if 'missing' in arch.attrib:
|
||||||
for package in arch.attrib['missing'].split(','):
|
for package in arch.attrib['missing'].split(','):
|
||||||
if not self.is_binary(
|
if not self.is_binary(
|
||||||
@ -760,8 +764,6 @@ class CheckRepo(object):
|
|||||||
missings.append(package)
|
missings.append(package)
|
||||||
if arch.attrib['result'] not in ('succeeded', 'excluded'):
|
if arch.attrib['result'] not in ('succeeded', 'excluded'):
|
||||||
isgood = False
|
isgood = False
|
||||||
if arch.attrib['result'] == 'excluded' and arch.attrib['arch'] == 'x86_64':
|
|
||||||
request.build_excluded = True
|
|
||||||
if arch.attrib['result'] == 'disabled':
|
if arch.attrib['result'] == 'disabled':
|
||||||
founddisabled = True
|
founddisabled = True
|
||||||
if arch.attrib['result'] == 'failed' or arch.attrib['result'] == 'unknown':
|
if arch.attrib['result'] == 'failed' or arch.attrib['result'] == 'unknown':
|
||||||
@ -794,9 +796,6 @@ class CheckRepo(object):
|
|||||||
if missings:
|
if missings:
|
||||||
request.missings[repo_name] = missings
|
request.missings[repo_name] = missings
|
||||||
|
|
||||||
if result:
|
|
||||||
return True
|
|
||||||
|
|
||||||
if alldisabled:
|
if alldisabled:
|
||||||
msg = '%s is disabled or does not build against factory. Please fix and resubmit' % request.src_package
|
msg = '%s is disabled or does not build against factory. Please fix and resubmit' % request.src_package
|
||||||
print 'DECLINED', msg
|
print 'DECLINED', msg
|
||||||
@ -822,7 +821,8 @@ class CheckRepo(object):
|
|||||||
request.updated = True
|
request.updated = True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
# No idea why it was return True in the past, it should return True only when result is True, otherwise False
|
||||||
|
return result
|
||||||
|
|
||||||
def get_package_list_from_repository(self, project, repository, arch, package):
|
def get_package_list_from_repository(self, project, repository, arch, package):
|
||||||
url = makeurl(self.apiurl, ('build', project, repository, arch, package))
|
url = makeurl(self.apiurl, ('build', project, repository, arch, package))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user