diff --git a/britney.conf b/britney.conf index 163aff9..b984e0a 100644 --- a/britney.conf +++ b/britney.conf @@ -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 = diff --git a/britney.py b/britney.py index a0eab20..eb994bb 100755 --- a/britney.py +++ b/britney.py @@ -517,6 +517,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': diff --git a/britney2/excusefinder.py b/britney2/excusefinder.py index de79435..5a092ba 100644 --- a/britney2/excusefinder.py +++ b/britney2/excusefinder.py @@ -327,7 +327,8 @@ 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) - archs_to_consider.append('all') + if self.options.has_arch_all_buildds: + archs_to_consider.append('all') for arch in archs_to_consider: oodbins = {} uptodatebins = False @@ -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 - if binary_u.architecture != arch: - continue + # 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 diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 6cb37ae..63226f7 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -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") diff --git a/tests/test_policy.py b/tests/test_policy.py index 00af280..1952831 100644 --- a/tests/test_policy.py +++ b/tests/test_policy.py @@ -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), ''),