tag 625792 + patch thanks On Fri, 2011-05-06 at 20:14 +0100, Adam D. Barratt wrote: > On Fri, 2011-05-06 at 20:57 +0200, Julien Cristau wrote: > > On Fri, May 6, 2011 at 00:27:18 +0100, Adam D. Barratt wrote: > > > > > thunar-vfs > > > - the source isn't in testing; so steps A, C and D are skipped > > > - unstable's ristretto doesn't depend on libthunar-vfs-1-2, so the > > > package isn't marked for checking again > > > > > hrm, but why does unstable's ristretto matter at that point, rather than > > testing's? (Apologies if I'm missing something obvious.) > > It's not unstable's ristretto so much as unstable's thunar-vfs. > > After adding thunar-vfs to testing, the record for the libthunar-vfs-1-2 > binary built from that source is copied from unstable to testing, > including the previously computed list of reverse dependencies, which is > then used to look for affected packages.
So, the solution to this turned out to be reasonably simple, although it took me a while to see that. iter_packages() has a list of undo dictionaries for the entire exo hint, which includes the fact that the previous version of libthunar-vfs-1-2 had ristretto as a reverse-dependency; the fix is to make doop_source() aware of that undo information. Patch attached. I'll probably push it in a day or so unless anyone yells or points out issues with it. Regards, Adam
diff --git a/britney.py b/britney.py index 7c72a56..b03dc0d 100755 --- a/britney.py +++ b/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))