Package: ftp.debian.org
Severity: normal
Tags: patch

Hi,

In some cases, dak crashes with a stacktrace when doing "dak rm -R".
Both Adam and I have experienced it, but it only happens in very few
cases.

The issue seems to be caused by the same "non-main" being tested more
than twice in the removal or so.  What happens is that the "source"
variable gets changed from "$src" to "$src/$comp" and then to
"$src/$comp/$comp" (and so on...).

Attached is a patch to fix the particular problem I have seen.

~Niels
>From 0c6db617989c10c50609768827903cf8870daeb0 Mon Sep 17 00:00:00 2001
From: Niels Thykier <nthyk...@coccia.debian.org>
Date: Sun, 16 Feb 2014 09:14:11 +0000
Subject: [PATCH] daklib/utils.py: Fix crash on rdep test

Signed-off-by: Niels Thykier <nthyk...@coccia.debian.org>
---
 daklib/utils.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/daklib/utils.py b/daklib/utils.py
index 0710fb3..c75b6be 100644
--- a/daklib/utils.py
+++ b/daklib/utils.py
@@ -1834,9 +1834,10 @@ def check_reverse_depends(removals, suite, arches=None, session=None, cruft=Fals
                     .filter(Override.package == re.sub('/(contrib|non-free)$', '', source)) \
                     .join(Override.overridetype).filter(OverrideType.overridetype == 'dsc') \
                     .first()
+                key = source
                 if component != "main":
-                    source = "%s/%s" % (source, component)
-                all_broken.setdefault(source, set()).add(pp_deps(dep))
+                    key = "%s/%s" % (source, component)
+                all_broken.setdefault(key, set()).add(pp_deps(dep))
                 dep_problem = 1
 
     if all_broken:
-- 
1.7.10.4

Reply via email to