The following commit has been merged in the master branch:
commit 88a0baff55e928679551ff6c68bdc8884d6fbf62
Author: Raphaël Hertzog <[email protected]>
Date:   Sun Sep 20 10:59:05 2009 +0200

    Dpkg::Changelog: add new vendor hook post-process-changelog-entry
    
    This hook is mainly meant to extract more structured information
    from the raw changes information.

diff --git a/scripts/Dpkg/Changelog.pm b/scripts/Dpkg/Changelog.pm
index 46b961c..202b8fb 100644
--- a/scripts/Dpkg/Changelog.pm
+++ b/scripts/Dpkg/Changelog.pm
@@ -43,6 +43,7 @@ use Dpkg::Gettext;
 use Dpkg::ErrorHandling qw(:DEFAULT report);
 use Dpkg::Control;
 use Dpkg::Version qw(compare_versions);
+use Dpkg::Vendor qw(run_vendor_hook);
 
 use base qw(Exporter);
 
@@ -553,6 +554,7 @@ sub dpkg {
 
     $f->{Closes} = join " ", sort { $a <=> $b } @{$f->{Closes}};
     $f->{Urgency} .= $urg_comment;
+    run_vendor_hook("post-process-changelog-entry", $f);
 
     return %$f if wantarray;
     return $f;
@@ -611,6 +613,8 @@ sub rfc822 {
            $f->{$field} = $entry->{$field};
        }
 
+        run_vendor_hook("post-process-changelog-entry", $f);
+
        push @out_data, $f;
     }
 
diff --git a/scripts/Dpkg/Vendor/Default.pm b/scripts/Dpkg/Vendor/Default.pm
index d940839..881d8af 100644
--- a/scripts/Dpkg/Vendor/Default.pm
+++ b/scripts/Dpkg/Vendor/Default.pm
@@ -96,6 +96,12 @@ function.
 
 Known operations are "register", "insert_after" and "insert_before".
 
+=item post-process-changelog-entry ($fields)
+
+The hook is called in Dpkg::Changelog to post-process a
+Dpkg::Changelog::Entry after it has been created and filled with the
+appropriate values.
+
 =back
 
 =cut
@@ -111,7 +117,10 @@ sub run_hook {
         return ();
     } elsif ($hook eq "register-custom-fields") {
         return ();
+    } elsif ($hook eq "post-process-changelog-entry") {
+        my $fields = shift @params;
     }
+
 }
 
 =back

-- 
dpkg's main repository


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

Reply via email to