From 4433049e1c444db9536be2141431d98b0ea438e4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Aug 2009 11:08:45 -0400 Subject: dh: Allow creation of new sequences (such as to handle a patch target for quilt), by adding an add_command function to the sequence addon interface. See #540124. --- debian/changelog | 8 ++++++++ dh | 5 +++++ doc/PROGRAMMING | 7 ++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ae3846c3..69e75190 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +debhelper (7.3.12) UNRELEASED; urgency=low + + * dh: Allow creation of new sequences (such as to handle a patch + target for quilt), by adding an add_command function to the + sequence addon interface. See #540124. + + -- Joey Hess Thu, 06 Aug 2009 11:07:45 -0400 + debhelper (7.3.11) unstable; urgency=low * perl_build: Fix Build check to honor source directory setting. diff --git a/dh b/dh index c34a5a02..2a6c0a31 100755 --- a/dh +++ b/dh @@ -322,6 +322,11 @@ sub remove_command { } } +sub add_command { + my $command=shift; + my $sequence=shift; + unshift @{$sequences{$sequence}}, $command; +} foreach my $addon (@{$dh{WITH}}) { my $mod="Debian::Debhelper::Sequence::$addon"; $mod=~s/-/_/g; diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING index 4e7ea463..c3530f26 100644 --- a/doc/PROGRAMMING +++ b/doc/PROGRAMMING @@ -263,7 +263,12 @@ insert_after($existing_command, $new_command) Insert $new_command in sequences after $existing_command remove_command($existing_command) - Remove $existing_command from the list of commands to run. + Remove $existing_command from the list of commands to run + in all sequences. + +add_command($sequence, $new_command) + Add $new_command to the beginning of the specified sequence. + If the sequence does not exist, it will be created. Buildsystem Classes: ------------------- -- cgit v1.2.3