Fix excuse invalidation checks for arch-specific dependencies

A dependency on an arch-specific package which is not a valid candidate
should lead to the depending package not being a candidate.

For now we ensure that the generated excuses output remains the same,
so that we don't have to wait for consumers to adapt to a new format.
Changing the output format should be revisited at a later point.

See Debian bug #693068.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
master
Adam D. Barratt 12 years ago
parent 5ec47a0e72
commit c95169c8ca

@ -1084,7 +1084,10 @@ class Britney(object):
# for the solving packages, update the excuse to add the dependencies
for p in packages:
if arch not in self.options.break_arches.split():
excuse.add_dep(p, arch)
if p in self.sources['testing'] and self.sources['testing'][p][VERSION] == self.sources[suite][p][VERSION]:
excuse.add_dep("%s/%s" % (p, arch), arch)
else:
excuse.add_dep(p, arch)
else:
excuse.add_break_dep(p, arch)

@ -135,11 +135,15 @@ class Excuse(object):
(self.daysold, self.mindays))
for x in self.htmlline:
res = res + "<li>" + x + "\n"
for x in sorted(self.deps):
lastdep = ""
for x in sorted(self.deps, lambda x,y: cmp(x.split('/')[0], y.split('/')[0])):
dep = x.split('/')[0]
if dep == lastdep: continue
lastdep = dep
if x in self.invalid_deps:
res = res + "<li>Depends: %s <a href=\"#%s\">%s</a> (not considered)\n" % (self.name, x, x)
res = res + "<li>Depends: %s <a href=\"#%s\">%s</a> (not considered)\n" % (self.name, dep, dep)
else:
res = res + "<li>Depends: %s <a href=\"#%s\">%s</a>\n" % (self.name, x, x)
res = res + "<li>Depends: %s <a href=\"#%s\">%s</a>\n" % (self.name, dep, dep)
for (n,a) in self.break_deps:
if n not in self.deps:
res += "<li>Ignoring %s depends: <a href=\"#%s\">%s</a>\n" % (a, n, n)

Loading…
Cancel
Save