Bug#858671: bugs.debian.org: Handle "source" in {split,join}_status_fields

2017-03-31 Thread James McCoy
On Mar 31, 2017 10:25, "Don Armstrong"  wrote:

On Thu, 30 Mar 2017, Don Armstrong wrote:
> I've tweaked that, which should fix this issue too. [In
> master@7c98c4f499ca].

Could you test to see if this works now? [Unfortunately, testing the
source versions is a bit difficult in the testing harness right now.]


It did work. Thanks!

Cheers,
James


Bug#858671: bugs.debian.org: Handle "source" in {split,join}_status_fields

2017-03-31 Thread Don Armstrong
On Thu, 30 Mar 2017, Don Armstrong wrote:
> I've tweaked that, which should fix this issue too. [In
> master@7c98c4f499ca].

Could you test to see if this works now? [Unfortunately, testing the
source versions is a bit difficult in the testing harness right now.]

-- 
Don Armstrong  https://www.donarmstrong.com

The computer allows you to make mistakes faster than any other
invention, with the possible exception of handguns and tequila
 -- Mitch Ratcliffe



Bug#858671: bugs.debian.org: Handle "source" in {split,join}_status_fields

2017-03-30 Thread Don Armstrong
On Fri, 24 Mar 2017, James McCoy wrote:
> When I attempted to tag 845066 pending, it failed in check_limit() since
> "source" had not been split into a list.  I'm not sure if there should
> be something preventing things from getting in this state, but the
> attached patch should at least allow limits to be applied.

The actual issue is that source is getting the split version when
get_bug_status is called, instead of the unsplit version.

I've tweaked that, which should fix this issue too. [In
master@7c98c4f499ca].

[I also found another issue while debugging this which I've fixed.]


-- 
Don Armstrong  https://www.donarmstrong.com

2: There is no out. There is only in.
  -- "The Prisoner (2009 Miniseries)"



Bug#858671: bugs.debian.org: Handle "source" in {split,join}_status_fields

2017-03-24 Thread James McCoy
Package: bugs.debian.org
Severity: normal
Tags: patch

When I attempted to tag 845066 pending, it failed in check_limit() since
"source" had not been split into a list.  I'm not sure if there should
be something preventing things from getting in this state, but the
attached patch should at least allow limits to be applied.

-- System Information:
Debian Release: 9.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
>From cb8b389587012afb051c66705e082ac1873af519 Mon Sep 17 00:00:00 2001
From: James McCoy 
Date: Fri, 24 Mar 2017 23:13:09 -0400
Subject: [PATCH] Handle "source" in {split,join}_status_fields

split is needed, at least, when a source package is renamed.
When handling <1490327595-7-bts-james...@debian.org>, set_tag failed
because it didn't know how to handle the "source: msgpack, msgpack-c"
resulting in:

> limit source msgpack-c
Limiting to bugs with field 'source' containing at least one of 'msgpack-c'
Limit currently set to 'source':'msgpack-c'

> tags 845066 + pending
source: "msgpack, msgpack-c"' does not match at least one of "msgpack-c"
Failed to alter tags of Bug 845066: limit failed for bugs: 845066.

> thanks
Stopping processing here.

Signed-off-by: James McCoy 
---
 Debbugs/Status.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm
index dabf811..38091cf 100644
--- a/Debbugs/Status.pm
+++ b/Debbugs/Status.pm
@@ -306,6 +306,7 @@ our $ditch_empty = sub{
 my $ditch_empty_space = sub {return &{$ditch_empty}(' ',@_)};
 my %split_fields =
 (package=> \,
+ source => \,
  affects=> \,
  blocks => $ditch_empty_space,
  blockedby  => $ditch_empty_space,
@@ -361,6 +362,7 @@ if we transition to split fields by default).
 sub join_status_fields {
 my %join_fields =
(package=> ', ',
+source => ', ',
 affects=> ', ',
 blocks => ' ',
 blockedby  => ' ',
-- 
2.11.0