[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#815995: release.debian.org: britney fail with KeyError: error



Control: tags -1 patch

Christian Marillat:
> On 26 févr. 2016 17:53, Niels Thykier <niels@thykier.net> wrote:
> 
>> Control: tags -1 moreinfo
>>
>> Christian Marillat:
> 
> [...]
> 
>> Can you please provide the following information:
>>
>>  * Can we get a copy of the data set that triggers the issue?
>>    (including the config file).
> 
> [... resources ...]

Many thanks for the data set and apologies for the delay.

I have written a patch (attached) that works around the issue.  I also
wrote a "minimal" test case at [1].

I will include the patch in the next patchset that I will submit for
review on d-release@l.d.o. :)

> 
> I see also the same bug in Ubuntu, but this is not the same code :
> 
> https://bazaar.launchpad.net/~ubuntu-release/britney/britney2-ubuntu/revision/566
> 

I suspect that is an unrelated issue, which is caused by their own
patches (or an old code path that is now removed).

>>  * What version of Britney are you using (e.g. the git commit)?
> 
> britney2 commit is 92deb4d1b9e1237316e96b8c9b745836b69eab38
> 
> Christian
> 

Thanks,
~Niels

[1]
https://anonscm.debian.org/cgit/collab-maint/britney2-tests.git/commit/?h=britney-fixes-2016-03&id=3485775677aee69d3dd9cb7d1415e3e51371faa1


From ef9e9b9d1320f1c3e50e7c0d213e7d504f83bbc6 Mon Sep 17 00:00:00 2001
From: Niels Thykier <niels@thykier.net>
Date: Tue, 22 Mar 2016 20:37:48 +0000
Subject: [PATCH] britney: Work around bug 815995

This bug involves a corner case that involves:

 * source orig providing liborig1 and orig-doc in testing
 * source orig providing liborig2 and orig-doc in unstable
 * source hijack providing liborig2 and orig-doc in both testing and unstable,
   where the versions of hijack's binaries has a higher version than those of
   "orig".

The arch:all packages are needed to trigger this, because Britney
flags an arch:any package as "out of date" and stops the migration
there.  However, she is more lenient with arch:all packages.

What happens is that Britney realises that src:orig need to be updated
in testing (to remove liborig1).  This leaves src:orig with no
binaries left in testing (as the orig-doc from hijack is used) and it
is therefore removed as an obsolete source.  The obsolete removal then
exploded because Britney was also trying to remove the liborig1
package, which is no longer there.

Signed-off-by: Niels Thykier <niels@thykier.net>
---
 britney.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/britney.py b/britney.py
index 2cfc4c0..9c5f219 100755
--- a/britney.py
+++ b/britney.py
@@ -1930,6 +1930,10 @@ class Britney(object):
                         and parch != migration_architecture):
                         continue
 
+                    # Work around #815995
+                    if is_removal and binary not in binaries_t[parch][0]:
+                        continue
+
                     if (not include_hijacked
                         and binaries_t[parch][0][binary][SOURCE] != source_name):
                         continue
-- 
2.7.0

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: