action #2876 - Request.missing is not propley set in cached packages
This commit is contained in:
parent
76fea40ebf
commit
62001bcf9a
@ -296,7 +296,7 @@ def _check_repo_group(self, id_, requests, opts):
|
|||||||
greqs = opts.groups.get(rq.group, [])
|
greqs = opts.groups.get(rq.group, [])
|
||||||
if request in greqs:
|
if request in greqs:
|
||||||
continue
|
continue
|
||||||
package = '%s(rq%s)' % (package, request)
|
package = '#[%s](%s)' % (request, package)
|
||||||
smissing.append(package)
|
smissing.append(package)
|
||||||
if len(smissing):
|
if len(smissing):
|
||||||
msg = 'Please make sure to wait before these depencencies are in %s: %s' % (rq.tgt_project, ', '.join(smissing))
|
msg = 'Please make sure to wait before these depencencies are in %s: %s' % (rq.tgt_project, ', '.join(smissing))
|
||||||
|
@ -528,6 +528,28 @@ class CheckRepo(object):
|
|||||||
|
|
||||||
return downloads
|
return downloads
|
||||||
|
|
||||||
|
def get_missings(self, request):
|
||||||
|
"""Get the list of packages that are in missing status."""
|
||||||
|
|
||||||
|
missings = set()
|
||||||
|
|
||||||
|
# XXX TODO - This piece is contained in
|
||||||
|
# is_buildsuccess(). Integrate both.
|
||||||
|
repos_to_check = self.repositories_to_check(request)
|
||||||
|
for repository in repos_to_check:
|
||||||
|
for arch in repository.findall('arch'):
|
||||||
|
if arch.attrib['arch'] not in ('i586', 'x86_64'):
|
||||||
|
continue
|
||||||
|
if 'missing' in arch.attrib:
|
||||||
|
for package in arch.attrib['missing'].split(','):
|
||||||
|
if not self.is_binary(
|
||||||
|
request.src_project,
|
||||||
|
repository.attrib['name'],
|
||||||
|
arch.attrib['arch'],
|
||||||
|
package):
|
||||||
|
missings.add(package)
|
||||||
|
return sorted(missings)
|
||||||
|
|
||||||
def is_buildsuccess(self, request):
|
def is_buildsuccess(self, request):
|
||||||
"""Return True if the request is correctly build
|
"""Return True if the request is correctly build
|
||||||
|
|
||||||
@ -544,6 +566,7 @@ class CheckRepo(object):
|
|||||||
if self.is_request_cached(request):
|
if self.is_request_cached(request):
|
||||||
request.is_cached = True
|
request.is_cached = True
|
||||||
request.goodrepos = self._get_goodrepos_from_local(request)
|
request.goodrepos = self._get_goodrepos_from_local(request)
|
||||||
|
request.missings = self.get_missings(request)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# If the request do not build properly in both Intel platforms,
|
# If the request do not build properly in both Intel platforms,
|
||||||
@ -558,7 +581,7 @@ class CheckRepo(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
result = False
|
result = False
|
||||||
missings = {}
|
missings = set()
|
||||||
alldisabled = True
|
alldisabled = True
|
||||||
foundbuilding = None
|
foundbuilding = None
|
||||||
foundfailed = None
|
foundfailed = None
|
||||||
@ -568,7 +591,6 @@ class CheckRepo(object):
|
|||||||
founddisabled = False
|
founddisabled = False
|
||||||
r_foundbuilding = None
|
r_foundbuilding = None
|
||||||
r_foundfailed = None
|
r_foundfailed = None
|
||||||
r_missings = {}
|
|
||||||
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
|
||||||
@ -579,7 +601,7 @@ class CheckRepo(object):
|
|||||||
repository.attrib['name'],
|
repository.attrib['name'],
|
||||||
arch.attrib['arch'],
|
arch.attrib['arch'],
|
||||||
package):
|
package):
|
||||||
missings[package] = 1
|
missings.add(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':
|
if arch.attrib['result'] == 'excluded' and arch.attrib['arch'] == 'x86_64':
|
||||||
@ -601,9 +623,6 @@ class CheckRepo(object):
|
|||||||
request.updated = True
|
request.updated = True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
r_missings = r_missings.keys()
|
|
||||||
for pkg in r_missings:
|
|
||||||
missings[pkg] = 1
|
|
||||||
if not founddisabled:
|
if not founddisabled:
|
||||||
alldisabled = False
|
alldisabled = False
|
||||||
if isgood:
|
if isgood:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user