Reject some excuses with unsatisfiable depends

Ideally we would reject all items with known unsatisfiable
dependencies as they would not be installable in testing.  However,
there are a few known corner cases where we still want to migrate them
(notably when they are already broken in testing).

This commit is an attempt to weed out some of the "obviously" broken
items that will not successfully migrate.

Signed-off-by: Niels Thykier <niels@thykier.net>
debian
Niels Thykier 9 years ago
parent 8991889fad
commit ac66e3118d

@ -947,7 +947,8 @@ class Britney(object):
# analyze the dependency fields (if present) # analyze the dependency fields (if present)
deps = binary_u.depends deps = binary_u.depends
if not deps: if not deps:
return return True
is_all_ok = True
# for every dependency block (formed as conjunction of disjunction) # for every dependency block (formed as conjunction of disjunction)
for block, block_txt in zip(parse_depends(deps, False), deps.split(',')): for block, block_txt in zip(parse_depends(deps, False), deps.split(',')):
@ -972,6 +973,8 @@ class Britney(object):
if not packages: if not packages:
excuse.addhtml("%s/%s unsatisfiable Depends: %s" % (pkg, arch, block_txt.strip())) excuse.addhtml("%s/%s unsatisfiable Depends: %s" % (pkg, arch, block_txt.strip()))
excuse.addreason("depends") excuse.addreason("depends")
if arch not in self.options.break_arches:
is_all_ok = False
continue continue
# for the solving packages, update the excuse to add the dependencies # for the solving packages, update the excuse to add the dependencies
@ -983,6 +986,7 @@ class Britney(object):
excuse.add_dep(p, arch) excuse.add_dep(p, arch)
else: else:
excuse.add_break_dep(p, arch) excuse.add_break_dep(p, arch)
return is_all_ok
# Package analysis methods # Package analysis methods
# ------------------------ # ------------------------
@ -1409,7 +1413,9 @@ class Britney(object):
# 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
if binary_u.architecture != 'all' or arch in self.options.nobreakall_arches: if binary_u.architecture != 'all' or arch in self.options.nobreakall_arches:
self.excuse_unsat_deps(pkg, src, arch, suite, excuse) is_valid = self.excuse_unsat_deps(pkg, src, arch, suite, excuse)
if not is_valid and not source_t:
update_candidate = False
# if there are out-of-date packages, warn about them in the excuse and set update_candidate # 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 # to False to block the update; if the architecture where the package is out-of-date is

Loading…
Cancel
Save