Author: adsb
Date: 2009-05-10 20:33:28 +0000 (Sun, 10 May 2009)
New Revision: 1877
Modified:
trunk/debian/changelog
trunk/scripts/mass-bug.pl
Log:
mass-bug: Add an option to specify that the supplied package names are
those of source packages rather than binary packages. Based on a patch
by Felipe Sateler. (Closes: #527396)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-05-05 18:04:25 UTC (rev 1876)
+++ trunk/debian/changelog 2009-05-10 20:33:28 UTC (rev 1877)
@@ -4,6 +4,9 @@
distributions.
* debuild: Use printf when parsing the DEBUILD_LINTIAN_OPTS configuration
file variable, to avoid eating -E. (Closes: #527027)
+ * mass-bug: Add an option to specify that the supplied package names are
+ those of source packages rather than binary packages. Based on a patch
+ by Felipe Sateler. (Closes: #527396)
* rc-alert: Use standard single quotes in the debtags section of the manpage
to avoid odd formatting and warnings from man
Modified: trunk/scripts/mass-bug.pl
===================================================================
--- trunk/scripts/mass-bug.pl 2009-05-05 18:04:25 UTC (rev 1876)
+++ trunk/scripts/mass-bug.pl 2009-05-10 20:33:28 UTC (rev 1877)
@@ -96,6 +96,11 @@
Set the BTS pseudo-header for usertags.
+=item --source
+
+Specify that package names refer to source packages rather than binary
+packages.
+
=item --sendmail=SENDMAILCMD
Specify the sendmail command. The command will be split on white
@@ -178,6 +183,7 @@
--tags=tags Set the BTS pseudo-header for tags.
--user=user Set the BTS pseudo-header for a usertags' user
--usertags=usertags Set the BTS pseudo-header for usertags
+ --source Specify that package names refer to source packages
--sendmail=cmd Sendmail command to use (default /usr/sbin/sendmail)
--no-wrap Don't wrap the template to 70 chars.
@@ -279,6 +285,7 @@
my $user=shift;
my $usertags=shift;
my $nowrap=shift;
+ my $type=shift;
my $version="";
my $bugtext;
@@ -304,7 +311,7 @@
$template_text=fill("", "", $template_text);
}
}
- $bugtext = "Package: $package\n$version" . "Severity:
$severity\n$tags$user$usertags\n$template_text";
+ $bugtext = "$type: $package\n$version" . "Severity:
$severity\n$tags$user$usertags\n$template_text";
return $bugtext;
}
@@ -371,6 +378,7 @@
my $tags="";
my $user="";
my $usertags="";
+my $type="Package";
my $opt_sendmail;
my $nowrap="";
if (! GetOptions(
@@ -381,6 +389,7 @@
"tags=s" => \$tags,
"user=s" => \$user,
"usertags=s" => \$usertags,
+ "source" => sub { $type="Source"; },
"sendmail=s" => \$opt_sendmail,
"help" => sub { usage(); exit 0; },
"version" => sub { version(); exit 0; },
@@ -464,7 +473,7 @@
print "To: $submission_email\n";
print "Subject: ".gen_subject($subject, $package)."\n";
print "\n";
- print gen_bug($template_text, $package, $severity, $tags, $user,
$usertags, $nowrap)."\n";
+ print gen_bug($template_text, $package, $severity, $tags, $user,
$usertags, $nowrap, $type)."\n";
}
if ($mode eq 'display') {
@@ -496,7 +505,7 @@
foreach my $package (@packages) {
print "Sending bug for $package ...\n";
mailbts(gen_subject($subject, $package),
- gen_bug($template_text, $package, $severity, $tags, $user,
$usertags, $nowrap),
+ gen_bug($template_text, $package, $severity, $tags, $user,
$usertags, $nowrap, $type),
$submission_email, $from);
}
print "All bugs sent.\n";
--
To unsubscribe, send mail to [email protected].