%mapkv=(); # for future use
$i=100;grep($fieldimps{$_}=$i--,
- qw(Source Version Distribution Urgency Maintainer Date Changes));
+ qw(Source Version Distribution Urgency Maintainer Date Closes
+ Changes));
$i=1;grep($urgencies{$_}=$i++,
qw(low medium routine high urgent emergency));
$f{'Changes'} =~ s/\n$//;
$f{'Changes'} =~ s/^/\n/;
+while ($f{'Changes'} =~ /closes:\s*(?:bug)?\#\d+(?:,\s*(?:bug)?\#\d+)*/ig) {
+ push(@closes, $& =~ /\#(\d+)/g);
+}
+$f{'Closes'} = join(' ',sort { $a <=> $b} @closes);
+
&outputclose(0);
sub clerror { &error("$_[0], at changelog line $."); }
grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size));
-$substvar{'Format'}= 1.5;
+$substvar{'Format'}= 1.6;
$substvar{'Newline'}= "\n";
$substvar{'Space'}= " ";
$substvar{'Tab'}= "\t";
$i=100;grep($fieldimps{$_}=$i--,
qw(Format Date Source Binary Architecture Version
- Distribution Urgency Maintainer Description Changes Files));
+ Distribution Urgency Maintainer Description Closes Changes
+ Files));
while (@ARGV) {
$_=shift(@ARGV);
#print STDERR "L key >$_< value >$v<\n";
if (m/^Source$/) {
&setsourcepackage;
- } elsif (m/^(Version|Maintainer|Changes|Urgency|Distribution|Date)$/) {
+ } elsif (m/^(Version|Maintainer|Changes|Urgency|Distribution|Date|Closes)$/) {
$f{$_}= $v;
} elsif (s/^X[BS]*C[BS]*-//i) {
$f{$_}= $v;