summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2009-09-20 11:13:10 +0200
committerRaphaël Hertzog <hertzog@debian.org>2009-09-20 12:06:10 +0200
commit3df3fe4ce2ca36d679053a7b4f6415cfad25daed (patch)
treed0fc8864c8a2c1ec8a84dc9d2007ae12ccd09d92 /scripts
parent6f721eaa8b2caa26ec1fc911474191d89c6f3cb2 (diff)
downloaddpkg-3df3fe4ce2ca36d679053a7b4f6415cfad25daed.tar.gz
Dpkg::Vendor::Ubuntu: move Launchpad-Bugs-Fixed creation in another hook
The creation of the Launchpad-Bugs-Fixed field is now done in post-process-changelog-entry instead of before-changes-creation so that it's also output by dpkg-parsechangelog and not only in the .changes file. Closes: #536066
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Dpkg/Vendor/Ubuntu.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/Dpkg/Vendor/Ubuntu.pm b/scripts/Dpkg/Vendor/Ubuntu.pm
index b4b4596ea..545b02ebd 100644
--- a/scripts/Dpkg/Vendor/Ubuntu.pm
+++ b/scripts/Dpkg/Vendor/Ubuntu.pm
@@ -64,17 +64,12 @@ sub run_hook {
} elsif ($hook eq "before-changes-creation") {
my $fields = shift @params;
- # Add Launchpad-Bugs-Fixed field
- my $bugs = find_launchpad_closes($fields->{"Changes"} || "");
- if (scalar(@{$bugs})) {
- $fields->{"Launchpad-Bugs-Fixed"} = join(" ", @{$bugs});
- }
-
} elsif ($hook eq "keyrings") {
my @keyrings = $self->SUPER::run_hook($hook);
push(@keyrings, '/usr/share/keyrings/ubuntu-archive-keyring.gpg');
return @keyrings;
+
} elsif ($hook eq "register-custom-fields") {
my @field_ops = $self->SUPER::run_hook($hook);
push @field_ops,
@@ -83,6 +78,15 @@ sub run_hook {
[ "insert_after", CTRL_FILE_CHANGES, "Closes", "Launchpad-Bugs-Fixed" ],
[ "insert_after", CTRL_CHANGELOG, "Closes", "Launchpad-Bugs-Fixed" ];
return @field_ops;
+
+ } elsif ($hook eq "post-process-changelog-entry") {
+ my $fields = shift @params;
+
+ # Add Launchpad-Bugs-Fixed field
+ my $bugs = find_launchpad_closes($fields->{"Changes"} || "");
+ if (scalar(@$bugs)) {
+ $fields->{"Launchpad-Bugs-Fixed"} = join(" ", @$bugs);
+ }
}
}