excusefinder: Support not having arch-all buildds

On some distros (Ubuntu), arch:all packages are built along with one of
the architectures. We shouldn't be listing 'all' as its own arch in this
case. Instead we filter out the binaries except for on the
'all_buildarch'.
ubuntu/dry-run
Iain Lane 5 years ago committed by Iain Lane
parent c9d45ecb2b
commit a5828a269e

@ -33,6 +33,9 @@ NOBREAKALL_ARCHES = i386 amd64
# primary architecture used for checking Build-Depends-Indep
ALL_BUILDARCH = amd64
# is arch-all built separately? i.e. can it fail independently of another arch?
HAS_ARCH_ALL_BUILDDS = yes
# if you're in this list, your packages may not stay in sync with the source
OUTOFSYNC_ARCHES =

@ -518,6 +518,8 @@ class Britney(object):
if not hasattr(self.options, 'adt_retry_url_mech'):
self.options.adt_retry_url_mech = ''
self.options.has_arch_all_buildds = getattr(self.options, 'has_arch_all_buildds', 'yes') == 'yes'
self._policy_engine.add_policy(DependsPolicy(self.options, self.suite_info))
self._policy_engine.add_policy(RCBugPolicy(self.options, self.suite_info))
if getattr(self.options, 'piuparts_enable', 'yes') == 'yes':

@ -327,6 +327,7 @@ class ExcuseFinder(object):
# at this point, we check the status of the builds on all the supported architectures
# to catch the out-of-date ones
archs_to_consider = list(self.options.architectures)
if self.options.has_arch_all_buildds:
archs_to_consider.append('all')
for arch in archs_to_consider:
oodbins = {}
@ -345,13 +346,20 @@ class ExcuseFinder(object):
binary_u = all_binaries[pkg_id]
pkgsv = binary_u.source_version
# arch:all packages are treated separately from arch:arch
# arch:all packages are treated separately from arch:arch if
# they have their own buildds
if self.options.has_arch_all_buildds:
if binary_u.architecture != arch:
continue
# TODO filter binaries based on checks below?
excuse.add_package(pkg_id)
# If we don't have arch:all buildds, drop arch:all packages on
# the non-arch-all-buildd arch
if not self.options.has_arch_all_buildds and arch != self.options.all_buildarch and binary_u.architecture != arch:
continue
# if it wasn't built by the same source, it is out-of-date
# if there is at least one binary on this arch which is
# up-to-date, there is a build on this arch

@ -374,7 +374,8 @@ class AutopkgtestPolicy(BasePolicy):
verdict = PolicyVerdict.REJECTED_TEMPORARILY
excuse.add_verdict_info(verdict, "nothing built yet, autopkgtest delayed")
if 'all' in excuse.missing_builds:
if (self.options.has_arch_all_buildds and 'all' in excuse.missing_builds) or \
(not self.options.has_arch_all_buildds and self.options.all_buildarch in excuse.missing_builds):
self.logger.info('%s hasn''t been built for arch:all, skipping autopkgtest policy', source_name)
verdict = PolicyVerdict.REJECTED_TEMPORARILY
excuse.add_verdict_info(verdict, "arch:all not built yet, autopkgtest delayed")

@ -47,6 +47,7 @@ def initialize_policy(test_name, policy_class, *args, **kwargs):
adt_regression_penalty=False,
adt_retry_url_mech='run_id',
fake_runtime=774000,
has_arch_all_buildds=True,
**kwargs)
suite_info = Suites(
Suite(SuiteClass.TARGET_SUITE, target, os.path.join(test_dir, target), ''),

Loading…
Cancel
Save