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

Bug#794194: britney: Strip off Multi-Arch qualifiers in reverse dependency calculation



Package: release.debian.org
Severity: normal
Tags: patch
User: release.debian.org@packages.debian.org
Usertags: britney

Hello,

in Ubuntu's britney instance (which triggers autopkgtests for gating
unstable → testing promotion) we noticed that some reverse
dependencies were not being triggered, for example:

   Package: ipython3
   Depends: python3:any (>= 3.3.2-2~)

(Dep list trimmed). This is because britney's reverse dependency
calculation tries to look up "python3:any" in the package map, which
isn't a valid package name. Thus these multi-arch qualifiers should be
stripped off in register_reverses().

Attached patch does that.

Thanks for considering,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
From f885961b7c74e531e66d5815ff66227a6addaaa3 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Fri, 31 Jul 2015 08:57:48 +0200
Subject: [PATCH] Consider packages with M-A qualifiers in reverse dependency
 map

Strip of Multi-Arch qualifiers like ":any" or ":native" in register_reverses()
for the dictionary lookup, as they are not part of the package name.

This will fix cases like

  Package: ipython3
  Depends: python3:any (>= 3)

and include ipython3 in python3's reverse dependencies.

Signed-off-by: Martin Pitt <mpitt@debian.org>
---
 britney_util.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/britney_util.py b/britney_util.py
index 346bac3..653cadb 100644
--- a/britney_util.py
+++ b/britney_util.py
@@ -233,7 +233,8 @@ def register_reverses(packages, provides, check_doubles=True, iterator=None,
         # go through the list
         for p in dependencies:
             for a in p:
-                dep = a[0]
+                # strip off Multi-Arch qualifiers like :any or :native
+                dep = a[0].split(':')[0]
                 # register real packages
                 if dep in packages and (not check_doubles or pkg not in packages[dep][RDEPENDS]):
                     packages[dep][RDEPENDS].append(pkg)
-- 
2.5.0

Attachment: signature.asc
Description: Digital signature


Reply to: