summaryrefslogtreecommitdiff
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
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
-rw-r--r--debian/changelog2
-rw-r--r--scripts/Dpkg/Vendor/Ubuntu.pm16
2 files changed, 12 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index ebe5c2bdb..8a00b787b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,8 @@ dpkg (1.15.5) UNRELEASED; urgency=low
information that was previously available through Dpkg::Deps.
* All dpkg-* perl programs that work with control information have been
updated to use the new Dpkg::Control interface.
+ * Create Launchpad-Bugs-Fixed directly in the changelog parsing code thanks
+ to a new vendor hook post-process-changelog-entry. Closes: #536066
[ Updated dpkg translations ]
* German (Sven Joachim).
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);
+ }
}
}