diff --git a/osc-check_repo.py b/osc-check_repo.py index df73f0b6..72e38b46 100644 --- a/osc-check_repo.py +++ b/osc-check_repo.py @@ -51,6 +51,15 @@ def _check_repo_download(self, request): # XXX TODO - Rewrite the logic here, meanwhile set is to x86_64 arch = 'x86_64' + + if request.src_package in request.i686_only: + # Use imported binaries from x86_64 to check the requirements is fine, + # but we can not get rpmlint.log from x86_64 repo if it was excluded, + # i586 repo should be are build succeeded already as we have check it + # in repositories_to_check(). Therefore, we have to download binary + # binary files from i586 repo. + arch = 'i586' + # if not request.build_excluded: # arch = 'x86_64' # else: diff --git a/osclib/checkrepo.py b/osclib/checkrepo.py index a138d796..f6bd0dfb 100644 --- a/osclib/checkrepo.py +++ b/osclib/checkrepo.py @@ -67,6 +67,7 @@ class Request(object): self.action_type = 'submit' # assume default self.downloads = [] self.is_shadow_devel = False + self.i686_only = ['glibc.i686'] if element: self.load(element) @@ -439,6 +440,12 @@ class CheckRepo(object): specs = [en.attrib['name'][:-5] for en in root.findall('entry') if en.attrib['name'].endswith('.spec')] + # special case for glibc.i686, it have not the relevant specfile for glibc.i686 + # but must be add it to requests list as a dummy request, otherwise the state + # has not be check and won't download it's binaries. + if 'glibc' in specs: + specs.append('glibc.i686') + # source checker already validated it if rq.src_package in specs: specs.remove(rq.src_package) @@ -772,8 +779,10 @@ class CheckRepo(object): for arch in repository.findall('arch'): if arch.attrib['arch'] not in ('i586', 'x86_64'): continue - if arch.attrib['result'] == 'excluded' and arch.attrib['arch'] == 'x86_64': - request.build_excluded = True + if arch.attrib['result'] == 'excluded': + if ((arch.attrib['arch'] == 'x86_64' and request.src_package not in request.i686_only) or + (arch.attrib['arch'] == 'i586' and request.src_package in request.i686_only)): + request.build_excluded = True if 'missing' in arch.attrib: for package in arch.attrib['missing'].split(','): if not self.is_binary(