Bug#842937: bts -n subscribe does not faithfully show what will happen with bts subscribe

積丹尼 Dan Jacobson jidanni at jidanni.org
Wed Nov 2 12:34:57 UTC 2016


Package: devscripts
Version: 2.16.8
Severity: minor
File: /usr/bin/bts

Looks scary:
$ bts -n subscribe 100000000 !
Use of uninitialized value $s in pattern match (m//) at /usr/bin/bts line 2562.
Use of uninitialized value $fromaddress in concatenation (.) or string at /usr/bin/bts line 2576.
Use of uninitialized value $from in concatenation (.) or string at /usr/bin/bts line 2579.
From: 
To: 100000000-subscribe at bugs.debian.org
Subject: subscription request for bug #100000000
Date: Wed, 02 Nov 2016 20:09:05 +0800
User-Agent: devscripts bts/2.16.8
Message-ID: <1478088545-455-bts->

thanks

But in fact this what really happens:
$ bts  subscribe 100000000 !
mailx: Null message body; hope that's ok

Which creates

Subject: subscription request for bug #100000000
To: <100000000-subscribe at bugs.debian.org>
X-Mailer: mail (GNU Mailutils 2.99.99)
Message-Id: <E1c1uNx-00030K-Nc at jidanni.org>
From: Dan Jacobson <jidanni at jidanni.org>
Date: Wed, 02 Nov 2016 20:11:17 +0800

with no body. Quite different than with -n.
First there is no body. Second the User-Agent is gone. Third the
Message-Id is different, etc.

So instead of the error messages, I would instead have this happen:
$ bts -n subscribe 100000000 !
To: 100000000-subscribe at bugs.debian.org
Subject: subscription request for bug #100000000

OK, now looking at this case.

$ bts -n subscribe 100000000 x at a.v
From: x at a.v
To: 100000000-subscribe at bugs.debian.org
Subject: subscription request for bug #100000000
Date: Wed, 02 Nov 2016 20:22:44 +0800
User-Agent: devscripts bts/2.16.8
Message-ID: <1478089364-2930-bts-x at a.v>

thanks

$ bts subscribe 100000000 x at a.v
indeed makes
From: x at a.v
To: 100000000-subscribe at bugs.debian.org
Subject: subscription request for bug #100000000
Date: Wed, 02 Nov 2016 20:16:16 +0800
User-Agent: devscripts bts/2.16.8
Message-ID: <1478088976-3912-bts-x at a.v>

thanks

So we see that the problem lies with -n combined with !.



More information about the devscripts-devel mailing list