Treat arch:all nearly as regular arch when determining out-of-dateness

Closes #859566
ubuntu/rebased
Paul Gevers 7 years ago
parent 7217c22b42
commit 0b58a313cb
No known key found for this signature in database
GPG Key ID: 9C5C99EB05BD750A

@ -1370,21 +1370,28 @@ class Britney(object):
# at this point, we check the status of the builds on all the supported architectures # at this point, we check the status of the builds on all the supported architectures
# to catch the out-of-date ones # to catch the out-of-date ones
pkgs = {src: ["source"]}
all_binaries = self.all_binaries all_binaries = self.all_binaries
for arch in self.options.architectures: archs_to_consider = list(self.options.architectures)
archs_to_consider.append('all')
for arch in archs_to_consider:
oodbins = {} oodbins = {}
uptodatebins = False uptodatebins = False
# for every binary package produced by this source in the suite for this architecture # for every binary package produced by this source in the suite for this architecture
for pkg_id in sorted(x for x in source_u.binaries if x.architecture == arch): if arch == 'all':
consider_binaries = source_u.binaries
else:
consider_binaries = sorted(x for x in source_u.binaries if x.architecture == arch)
for pkg_id in consider_binaries:
pkg = pkg_id.package_name pkg = pkg_id.package_name
if pkg not in pkgs: pkgs[pkg] = []
pkgs[pkg].append(arch)
# retrieve the binary package and its source version # retrieve the binary package and its source version
binary_u = all_binaries[pkg_id] binary_u = all_binaries[pkg_id]
pkgsv = binary_u.source_version pkgsv = binary_u.source_version
# arch:all packages are treated separately from arch:arch
if binary_u.architecture != arch:
continue
# if it wasn't built by the same source, it is out-of-date # 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 # if there is at least one binary on this arch which is
# up-to-date, there is a build on this arch # up-to-date, there is a build on this arch
@ -1395,10 +1402,7 @@ class Britney(object):
excuse.add_old_binary(pkg, pkgsv) excuse.add_old_binary(pkg, pkgsv)
continue continue
else: else:
# if the binary is arch all, it doesn't count as uptodatebins = True
# up-to-date for this arch
if binary_u.architecture == arch:
uptodatebins = True
# if the package is architecture-dependent or the current arch is `nobreakall' # if the package is architecture-dependent or the current arch is `nobreakall'
# find unsatisfied dependencies for the binary package # find unsatisfied dependencies for the binary package

Loading…
Cancel
Save