mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-13 15:37:02 +00:00
Ensure reverse-dependencies of superseded packages are always checked.
If a binary package being processed as part of a hint has moved source packages, the installability checks for the new version of the binary need to include the reverse-dependency information from the previous version. In order to allow this, modify doop_source() to take an optional list of undo information and iter_packages() to pass such a list when processing hints. Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
parent
a2539aa849
commit
62f56a7ec3
23
britney.py
23
britney.py
@ -1994,9 +1994,12 @@ class Britney:
|
||||
# check the package at the top of the tree
|
||||
return satisfy(pkg)
|
||||
|
||||
def doop_source(self, pkg):
|
||||
def doop_source(self, pkg, hint_undo=[]):
|
||||
"""Apply a change to the testing distribution as requested by `pkg`
|
||||
|
||||
An optional list of undo actions related to packages processed earlier
|
||||
in a hint may be passed in `hint_undo`.
|
||||
|
||||
This method applies the changes required by the action `pkg` tracking
|
||||
them so it will be possible to revert them.
|
||||
|
||||
@ -2112,6 +2115,22 @@ class Britney:
|
||||
key = (p, parch)
|
||||
if key not in affected: affected.append(key)
|
||||
self.systems[parch].remove_binary(binary)
|
||||
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?
|
||||
for (tundo, tpkg, tpkg_name, tsuite) in hint_undo:
|
||||
if p in tundo['binaries']:
|
||||
for rdep in tundo['binaries'][p][RDEPENDS]:
|
||||
if rdep in binaries[parch][0] and rdep not in source[BINARIES]:
|
||||
affected.append( (rdep, parch) )
|
||||
affected.extend( [ (x, parch) for x in \
|
||||
self.get_reverse_tree(rdep, parch, 'testing') ] )
|
||||
affected = list(set(affected))
|
||||
# add/update the binary package
|
||||
binaries[parch][0][binary] = self.binaries[suite][parch][0][binary]
|
||||
self.systems[parch].add_binary(binary, binaries[parch][0][binary][:PROVIDES] + \
|
||||
@ -2258,7 +2277,7 @@ class Britney:
|
||||
if pkg in pre_process:
|
||||
pkg_name, suite, affected, undo = pre_process[pkg]
|
||||
else:
|
||||
pkg_name, suite, affected, undo = self.doop_source(pkg)
|
||||
pkg_name, suite, affected, undo = self.doop_source(pkg, lundo)
|
||||
if hint:
|
||||
lundo.append((undo, pkg, pkg_name, suite))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user