osc-check_repo: protect staging project checks with arch conditions.

This commit is contained in:
Jimmy Berry 2017-05-11 22:50:00 -05:00
parent ab226e6007
commit 8feb347022

View File

@ -86,7 +86,9 @@ def _check_repo_download(self, request):
return set()
staging_prefix = '{}:'.format(self.checkrepo.staging.cstaging)
if staging_prefix in str(request.group):
if (str(request.group).startswith(staging_prefix) and
arch in self.checkrepo.target_archs(request.group)
):
pkglist = self.checkrepo.get_package_list_from_repository(
request.group, 'standard', arch,
request.src_package)
@ -99,11 +101,15 @@ def _check_repo_download(self, request):
toignore.update(fn[1] for fn in pkglist)
project_dvd = request.group + ':DVD'
if (not self.checkrepo.staging.is_adi_project(request.group) and
self.checkrepo.staging.crings and
arch in self.checkrepo.target_archs(project_dvd)
):
pkglist = self.checkrepo.get_package_list_from_repository(
request.group + ':DVD', 'standard',
'x86_64', request.src_package)
todownload = [ToDownload(request.group + ':DVD', 'standard',
'x86_64', fn[0], fn[3]) for fn in pkglist]
project_dvd, 'standard', arch, request.src_package)
todownload = [ToDownload(project_dvd, 'standard', arch, fn[0],
fn[3]) for fn in pkglist]
toignore.update(fn[1] for fn in pkglist)