Author: adam-guest
Date: 2008-04-22 22:49:35 +0000 (Tue, 22 Apr 2008)
New Revision: 1376
Modified:
trunk/debian/changelog
trunk/scripts/debchange.pl
Log:
debchange: Correctly handle the BTS returning no bugs for a package when
--closes is used (either because the package doesn't exist in the archive
or it has no open bugs)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-04-22 21:55:28 UTC (rev 1375)
+++ trunk/debian/changelog 2008-04-22 22:49:35 UTC (rev 1376)
@@ -3,6 +3,9 @@
* checkbashisms: When rebuilding the list of bashisms to check, ensure it is
based on whether the current file is a makefile, rather than whether the
previous file was. Thanks to Raphael Geissert for the brown paper bag.
+ * debchange: Correctly handle the BTS returning no bugs for a package when
+ --closes is used (either because the package doesn't exist in the archive
+ or it has no open bugs)
* debcheckout: Use the Vcs-* headers from the highest available version
rather than the first returned by "apt-get source"
Modified: trunk/scripts/debchange.pl
===================================================================
--- trunk/scripts/debchange.pl 2008-04-22 21:55:28 UTC (rev 1375)
+++ trunk/scripts/debchange.pl 2008-04-22 22:49:35 UTC (rev 1376)
@@ -727,13 +727,14 @@
my $bugs = Devscripts::Debbugs::select( "src:" . $PACKAGE );
my $statuses = Devscripts::Debbugs::status(
map {[bug => $_, indicatesource => 1]} @{$bugs} );
- if (not defined $bugs) {
- warn "$progname warning: Debbugs::status failed, so cannot query
the bug-tracking system\n";
+ if ($statuses eq "") {
+ warn "$progname warning: No bugs found for package $PACKAGE\n";
$opt_query=0;
$warnings++;
# This will now go and execute the "if (@closes and ! $opt_query)"
code
}
foreach my $close (@closes) {
+ last unless $opt_query;
if (exists $statuses->{$close}) {
my $title = $statuses->{$close}->{subject};
my $pkg = $statuses->{$close}->{package};
@@ -743,7 +744,7 @@
else { # not our package, or wnpp
my $bug = Devscripts::Debbugs::status(
[bug => $close, indicatesource => 1] );
- if (not defined $bug) {
+ if ($bug eq "") {
warn "$progname warning: unknown bug \#$close does not
belong to $PACKAGE,\n disabling closing changelog entry\n";
$warnings++;
push @closes_text, "Closes?? \#$close: UNKNOWN BUG IN WRONG
PACKAGE!!\n";
--
To unsubscribe, send mail to [EMAIL PROTECTED]