mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-13 15:37:02 +00:00
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>
This commit is contained in:
parent
c5d9a8eaa5
commit
e605091f24
@ -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)
|
||||
|
||||
|
10
excuse.py
10
excuse.py
@ -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…
x
Reference in New Issue
Block a user