Package: dpkg-dev
Version: 1.14.20
Severity: wishlist
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu intrepid ubuntu-patch

Hi,

In Ubuntu we have a scheme similar to "Closes: #12345" that allows
us to close Launchpad bugs from the changelog using "LP: #12345" 
notation. I would like Debian to include the patch to allow other
packages to find these bugs if they wish. I propose the following
patch to do this. Please consider applying it.

Thanks,

James

--- 1.14.20/scripts/Dpkg/Changelog.pm   2008-05-05 18:07:01.000000000 +0100
+++ 1.14.20ubuntu5/scripts/Dpkg/Changelog.pm    2008-06-26 13:06:51.000000000 
+0100
@@ -47,6 +47,7 @@ use base qw(Exporter);
 
 our %EXPORT_TAGS = ( 'util' => [ qw(
                 find_closes
+                find_launchpad_closes
                 data2rfc822
                 data2rfc822_mult
                 get_dpkg_changes
@@ -646,6 +652,29 @@ sub find_closes {
 
 =pod
 
+=head3 find_launchpad_closes
+
+Takes one string as argument and finds "LP: #123456, #654321" statements,
+which are references to bugs on Launchpad.  Returns all closed bug numbers
+in an array reference.
+
+=cut
+
+sub find_launchpad_closes {
+    my $changes = shift;
+    my @launchpad_closes = ();
+
+    while ($changes &&
+          ($changes =~ /lp:\s+\#\d+(?:,\s*\#\d+)*/ig)) {
+       push(@launchpad_closes, $& =~ /\#?\s?(\d+)/g);
+    }
+
+    @launchpad_closes = sort { $a <=> $b } @launchpad_closes;
+    return [EMAIL PROTECTED];
+}
+
+=pod
+
 =head3 data2rfc822
 
 Takes a single argument, either a Dpkg::Changelog::Entry object







-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to