From 5de1c86ac2c032ec5d92ccd8beed6677e07a8492 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 18 Feb 2009 21:04:45 -0800 Subject: [PATCH] add bug_status command to Debbugs::Common --- Debbugs/Common.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Debbugs/Common.pm b/Debbugs/Common.pm index aaa8db1..2044304 100644 --- a/Debbugs/Common.pm +++ b/Debbugs/Common.pm @@ -40,6 +40,7 @@ BEGIN{ @EXPORT = (); %EXPORT_TAGS = (util => [qw(getbugcomponent getbuglocation getlocationpath get_hashname), qw(appendfile buglog getparsedaddrs getmaintainers), + qw(bug_status), qw(getmaintainers_reverse), qw(getpseudodesc), ], @@ -177,6 +178,23 @@ sub buglog { return undef; } +=head2 bug_status + + bug_status($bugnum) + + +Returns the path to the summary file corresponding to the bug. + +Returns undef if the bug does not exist. + +=cut + +sub bug_status{ + my ($bugnum) = @_; + my $location = getbuglocation($bugnum, 'summary'); + return getbugcomponent($bugnum, 'summary', $location) if ($location); + return undef; +} =head2 appendfile -- 2.39.2