diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2009-09-20 10:59:05 +0200 |
---|---|---|
committer | Raphaël Hertzog <hertzog@debian.org> | 2009-09-20 12:06:04 +0200 |
commit | 88a0baff55e928679551ff6c68bdc8884d6fbf62 (patch) | |
tree | 7ef2e83065c6ab821ed50616a494d86ad762d951 /scripts | |
parent | 63044da0c7f67179d6e0cb3436f987248a44152e (diff) | |
download | dpkg-88a0baff55e928679551ff6c68bdc8884d6fbf62.tar.gz |
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.
Diffstat (limited to 'scripts')
-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 |