From 74cb69f5b425af5fd37ed13f4431df00ef8df899 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 28 Dec 2016 13:47:34 +0000 Subject: [PATCH] WIP nmu before go back and fill in more --- dgit | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/dgit b/dgit index c5108569..98499d46 100755 --- a/dgit +++ b/dgit @@ -611,6 +611,8 @@ our %defcfg = ('dgit.default.distro' => 'debian', # ^ this is a workaround but works (only) on DSA-administered machines 'dgit-distro.debian.git-url' => 'https://git.dgit.debian.org', 'dgit-distro.debian.git-url-suffix' => '', + 'dgit-distro.debian.nmu-bug-new' => 'submit@bugs.debian.org', + 'dgit-distro.debian.nmu-bug-old' => '@bugs.debian.org', 'dgit-distro.debian.upload-host' => 'ftp-master', # for dput 'dgit-distro.debian.mirror' => 'http://ftp.debian.org/debian/', 'dgit-distro.debian-security.archive-query' => 'aptget:', @@ -4044,21 +4046,18 @@ sub nmudiff_email_prepare ($) { die $donmudiff; } + my (@header, @psuedoheader, @body); + my @closes = split /\s+/, $dctrl->{Closes} // ''; if (@closes==1) { - push @header, < $closes[0].'@'.(access_cfg 'nmu-bug-old'), + Subject => "#$closes[0]: Fixed in NMU ($package $version)"; } else { - push @header, < (access_cfg 'nmu-bug-new'), + Subject => "$source: diff for NMU version $version"; } - push @header, < "dgit-$current", + 'Content-Type' => 'multipart/mixed'; + + $msg->attach(Charset => 'utf-8', + Data => (join "", @pseudoheader, "\n", @body), + Encoding => '-SUGGEST'); + + $msg->attach(Charset => 'utf-8', + Path => output of git diff, + Description => "NMU diff for $version", + Filename => "${package}_${version}_nmu.diff", + Disposition => 'attachment' + + + prepend dgit to x-mailer + push @header, + 'X-Mailer' => "dgit ($our_version)" + sub dopush () { printdebug "actually entering push\n"; -- 2.30.2