mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-13 15:37:02 +00:00
Take a different approach to excluding packages with unsatisfiable dependencies (see https://code.launchpad.net/~pitti/britney/britney2-autopkgtest-fixes/+merge/208657).
This commit is contained in:
parent
3d95702a59
commit
62bf1130f7
22
britney.py
22
britney.py
@ -1067,6 +1067,8 @@ class Britney(object):
|
||||
return
|
||||
deps = binary_u[DEPENDS]
|
||||
|
||||
all_satisfiable = True
|
||||
|
||||
# for every dependency block (formed as conjunction of disjunction)
|
||||
for block, block_txt in zip(parse_depends(deps, False), deps.split(',')):
|
||||
# if the block is satisfied in testing, then skip the block
|
||||
@ -1087,8 +1089,8 @@ class Britney(object):
|
||||
|
||||
# if no package can satisfy the dependency, add this information to the excuse
|
||||
if len(packages) == 0:
|
||||
excuse.invalidate_dep(block_txt.strip())
|
||||
excuse.addhtml("%s/%s unsatisfiable Depends: %s" % (pkg, arch, block_txt.strip()))
|
||||
all_satisfiable = False
|
||||
continue
|
||||
|
||||
# for the solving packages, update the excuse to add the dependencies
|
||||
@ -1101,6 +1103,8 @@ class Britney(object):
|
||||
else:
|
||||
excuse.add_break_dep(p, arch)
|
||||
|
||||
return all_satisfiable
|
||||
|
||||
# Package analysis methods
|
||||
# ------------------------
|
||||
|
||||
@ -1175,6 +1179,7 @@ class Britney(object):
|
||||
# the starting point is that there is nothing wrong and nothing worth doing
|
||||
anywrongver = False
|
||||
anyworthdoing = False
|
||||
unsat_deps = False
|
||||
|
||||
# for every binary package produced by this source in unstable for this architecture
|
||||
for pkg in sorted(ifilter(lambda x: x.endswith("/" + arch), source_u[BINARIES]), key=lambda x: x.split("/")[0]):
|
||||
@ -1211,7 +1216,8 @@ class Britney(object):
|
||||
break
|
||||
|
||||
# find unsatisfied dependencies for the new binary package
|
||||
self.excuse_unsat_deps(pkg_name, src, arch, suite, excuse)
|
||||
if not self.excuse_unsat_deps(pkg_name, src, arch, suite, excuse):
|
||||
unsat_deps = False
|
||||
|
||||
# if the binary is not present in testing, then it is a new binary;
|
||||
# in this case, there is something worth doing
|
||||
@ -1271,7 +1277,7 @@ class Britney(object):
|
||||
anyworthdoing = True
|
||||
|
||||
# if there is nothing wrong and there is something worth doing, this is a valid candidate
|
||||
if not anywrongver and anyworthdoing:
|
||||
if not anywrongver and not unsat_deps and anyworthdoing:
|
||||
excuse.is_valid = True
|
||||
self.excuses.append(excuse)
|
||||
return True
|
||||
@ -1483,7 +1489,10 @@ class Britney(object):
|
||||
# if the package is architecture-dependent or the current arch is `nobreakall'
|
||||
# find unsatisfied dependencies for the binary package
|
||||
if binary_u[ARCHITECTURE] != 'all' or arch in self.options.nobreakall_arches.split():
|
||||
self.excuse_unsat_deps(pkg, src, arch, suite, excuse)
|
||||
if not self.excuse_unsat_deps(pkg, src, arch, suite, excuse):
|
||||
update_candidate = False
|
||||
if arch in self.options.adt_arches.split():
|
||||
run_autopkgtest = False
|
||||
|
||||
# if there are out-of-date packages, warn about them in the excuse and set update_candidate
|
||||
# to False to block the update; if the architecture where the package is out-of-date is
|
||||
@ -1508,11 +1517,6 @@ class Britney(object):
|
||||
|
||||
excuse.addhtml(text)
|
||||
|
||||
# if the source has uninstallable dependencies, block the update
|
||||
if excuse.invalid_deps:
|
||||
update_candidate = False
|
||||
run_autopkgtest = False
|
||||
|
||||
# if the source package has no binaries, set update_candidate to False to block the update
|
||||
if len(self.sources[suite][src][BINARIES]) == 0:
|
||||
excuse.addhtml("%s has no binaries on any arch" % src)
|
||||
|
Loading…
x
Reference in New Issue
Block a user