Bug#673063: britney: doop_source possibly broken
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: britney
In doop_source britney has the following if-statement (indentation reduced):
"""
# if the binary already exists (built from another source)
if binary in binaries[parch][0]:
[...]
else:
# if the binary was previously built by a different
# source package in testing, all of the reverse
# dependencies of the old binary are affected.
# reverse dependencies built from this source can be
# ignored as their reverse trees are already handled
# by this function
# XXX: and the reverse conflict tree?
[...]
"""
The comments are slightly confusing on which branch is the "built from
other source"-case, but most likely it is the "else" branch. From this
I would expect that the majority of the "runs" will pass through the other
branch... but it is actually not the case.
An unconditional "AssertionError"[1] will (eventually) be triggered
during a live run, but it is rather far into the process. At that
point it has considered quite a few packages already packages.
With a trivial condition to rule out "common source migrations"[2], I
can complete the "live-2011-12-13" run in the test suite without
triggering the assertion.
Reviewing the surrounding code, I suspect the culprit to be this code
snippet appearing a bit above the aforementioned "if"-statement (NB:
indentation reduced):
"""
# remove all the binaries which aren't being smooth updated
for p in [ bin for bin in bins if bin not in smoothbins ]:
binary, parch = p.split("/")
[...]
# finally, remove the binary package
del binaries[parch][0][binary]
self.systems[parch].remove_binary(binary)
"""
~Niels
[1]
"""
# if the binary already exists (built from another source)
if binary in binaries[parch][0]:
raise AssertError()
"""
[2]
"""
# if the binary already exists (built from another source)
if binary in binaries[parch][0]:
if item.architecture == 'source' and \
binaries[parch][0][binary][SOURCE] == item.package:
raise AssertionError()
"""
Reply to: