From a565b2a000d7af91b305cff521f185f6deedd4ba Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 6 Mar 2019 11:33:28 -0700 Subject: notmuch-slurp-debbug: Fix the --bts-server argument Signed-off-by: Sean Whitton --- debian/changelog | 7 +++++++ mailscripts.el | 2 +- notmuch-slurp-debbug | 14 ++++++-------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 754d973..f5a08e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mailscripts (0.7-1) UNRELEASED; urgency=high + + * notmuch-slurp-debbug: Fix the --bts-server argument. + The 0.6 release broke use of this argument. + + -- Sean Whitton Wed, 06 Mar 2019 11:32:39 -0700 + mailscripts (0.6-1) unstable; urgency=high * notmuch-slurp-debbug: Further ensure that superfluous shells are not diff --git a/mailscripts.el b/mailscripts.el index 148b996..c68f7a9 100644 --- a/mailscripts.el +++ b/mailscripts.el @@ -1,7 +1,7 @@ ;;; mailscripts.el --- functions to access tools in the mailscripts package ;; Author: Sean Whitton -;; Version: 0.6 +;; Version: 0.7 ;; Package-Requires: (notmuch) ;; Copyright (C) 2018 Sean Whitton diff --git a/notmuch-slurp-debbug b/notmuch-slurp-debbug index 458f7a1..d424236 100755 --- a/notmuch-slurp-debbug +++ b/notmuch-slurp-debbug @@ -63,15 +63,14 @@ die "notmuch-slurp-debbug: $maildir does not look to be a maildir" && -d catfile($maildir, "new") && -d catfile($maildir, "tmp")); -my $bts_server_arg = defined $bts_server - ? "--bts-server $bts_server" +my @bts_server_args = defined $bts_server + ? ("--bts-server", $bts_server) : undef; # see #904182 for why we have to do it like this -systemx(grep defined, "bts", $bts_server_arg, - qw(--mbox --mailreader), "true %s", - "show", $bug) == 0 - or die "notmuch-slurp-debbug: bts failed"; +my @bts_args = grep defined, @bts_server_args, + qw(--mbox --mailreader), "true %s", "show", $bug; +systemx("bts", @bts_args); my $dir = File::Temp->newdir(); mkdir catfile($dir, "cur"); @@ -86,8 +85,7 @@ my $mbox = catfile $devscripts_cache, "$bug.mbox"; # note that mb2md won't work; it thinks Debian BTS mboxes contain just # a single message -systemx("mbox2maildir", $mbox, $dir) == 0 - or die "notmuch-slurp-debbug: mbox2maildir failed"; +systemx("mbox2maildir", $mbox, $dir); foreach my $message (glob "$dir/*/*") { my $message_head = MIME::Head->from_file($message); -- cgit v1.2.3