mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-13 15:37:02 +00:00
Make smooth updates slightly more intelligent
When processing a hint of the form "easy pkgX libX" where libX would be a candidate for smooth updates because pkgX/testing depends on it but pkgX/unstable does not, and there are no other reverse dependencies, the old binary from libX can simply be dropped straight away. Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
parent
af7987c561
commit
66b7eca0f0
21
britney.py
21
britney.py
@ -1847,8 +1847,25 @@ class Britney(object):
|
|||||||
# so note it for checking later
|
# so note it for checking later
|
||||||
rdeps = binaries[parch][0][binary][RDEPENDS]
|
rdeps = binaries[parch][0][binary][RDEPENDS]
|
||||||
|
|
||||||
if len([x for x in rdeps if x not in [y.split("/")[0] for y in bins]]) > 0:
|
# the list of reverse-dependencies may be outdated
|
||||||
smoothbins.append(p)
|
# if, for example, we're processing a hint and
|
||||||
|
# a new version of one of the apparent reverse-dependencies
|
||||||
|
# migrated earlier in the hint. walk the list to make
|
||||||
|
# sure that at least one of the entries is still
|
||||||
|
# valid
|
||||||
|
rdeps = [x for x in rdeps if x not in [y.split("/")[0] for y in bins]]
|
||||||
|
if len(rrdeps) > 0:
|
||||||
|
for dep in rrdeps:
|
||||||
|
if dep in binaries[parch][0]:
|
||||||
|
bin = binaries[parch][0][dep]
|
||||||
|
deps = []
|
||||||
|
if bin[DEPENDS] is not None:
|
||||||
|
deps.extend(apt_pkg.parse_depends(bin[DEPENDS], False))
|
||||||
|
if bin[PREDEPENDS] is not None:
|
||||||
|
deps.extend(apt_pkg.parse_depends(bin[PREDEPENDS], False))
|
||||||
|
if any(binary == entry[0] for deplist in deps for entry in deplist):
|
||||||
|
smoothbins.append(p)
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
check.append(p)
|
check.append(p)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user