diff options
-rw-r--r-- | scripts/Dpkg/Changelog.pm | 4 | ||||
-rw-r--r-- | scripts/Dpkg/Vendor/Default.pm | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/scripts/Dpkg/Changelog.pm b/scripts/Dpkg/Changelog.pm index 46b961c17..202b8fbc1 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 d940839bd..881d8af21 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 |