[devscripts] 01/01: debchange: Better handle trailers with only an e-mail address
Adam D. Barratt
adam at adam-barratt.org.uk
Thu Oct 30 09:14:45 UTC 2014
This is an automated email from the git hooks/post-receive script.
adsb pushed a commit to branch master
in repository devscripts.
commit e7306909c2576219f2fe0a956738233310e8135b
Author: Adam D. Barratt <adam at adam-barratt.org.uk>
Date: Thu Oct 30 09:12:44 2014 +0000
debchange: Better handle trailers with only an e-mail address
Don't drop changelog stanzas where the most recent trailer line
does not include a maintainer name.
Closes: #766516
Signed-off-by: Adam D. Barratt <adam at adam-barratt.org.uk>
---
debian/changelog | 4 ++++
scripts/debchange.pl | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 1681d09..0676ccf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,10 @@ devscripts (2.14.11) UNRELEASED; urgency=medium
(skipping the test on failure) and restore the original permissions on
completion. (Closes: #749729)
+ [ Adam D. Barratt ]
+ * debchange: Fix handling of changelogs where the most recent trailer line
+ does not include a maintainer name. (Closes: #766516)
+
-- Paul Wise <pabs at debian.org> Sun, 19 Oct 2014 17:27:24 +0800
devscripts (2.14.10) unstable; urgency=medium
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index 640e944..158fb09 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -645,7 +645,8 @@ if (! $opt_create || ($opt_create && $opt_news)) {
fatal "No maintainer in changelog!"
unless exists $changelog->{Maintainer};
$changelog->{Maintainer} = decode_utf8($changelog->{Maintainer});
- ($MAINTAINER,$EMAIL) = ($changelog->{Maintainer} =~ /^([^<]+) <(.*)>/);
+ ($MAINTAINER,$EMAIL) = ($changelog->{Maintainer} =~ /^([^<]*) <(.*)>/);
+ $MAINTAINER ||= '';
fatal "No distribution in changelog!"
unless exists $changelog->{Distribution};
if ($vendor eq 'Ubuntu') {
@@ -1342,7 +1343,7 @@ if (($opt_r || $opt_a || $merge) && ! $opt_create) {
($dist_indicator = $1) =~ s/[!:.,;]$//;
chomp $dist_indicator;
}
- elsif (/^ --\s+([^<]+)\s+/) {
+ elsif (/^ --\s+([^<]+)\s+/ || /^ --\s+<(.+?)>/) {
$lastmaint=$1;
# Remember where we are so we can skip back afterwards
$savedline = $line;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list