summaryrefslogtreecommitdiff
path: root/dh
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-05-19 12:39:02 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-05-19 12:39:02 -0400
commit8b2b327bb59a4ff9f207076658183df8aecc74ea (patch)
tree5f05f7773d0a4a57bfd0118c430cc6fb053de867 /dh
parent72245c218a286b9677d23f85a32bbad80b2dfa9f (diff)
dh: Add remove_command to the sequence interface.
Diffstat (limited to 'dh')
-rwxr-xr-xdh11
1 files changed, 11 insertions, 0 deletions
diff --git a/dh b/dh
index a116e3a..3882090 100755
--- a/dh
+++ b/dh
@@ -91,6 +91,10 @@ Insert I<new_command> in sequences before I<existing_command>.
Insert I<new_command> in sequences after I<existing_command>.
+=item Debian::Debhelper::Dh_Lib::remove_command(existing_command)
+
+Remove I<existing_command> from the list of commands to run.
+
=back
=cut
@@ -308,6 +312,13 @@ sub insert_before {
sub insert_after {
_insert(1, @_);
}
+sub remove_command {
+ my $command=shift;
+ foreach my $sequence (keys %sequences) {
+ $sequences{$sequence}=[grep { $_ ne $command } @{$sequences{$sequence}}];
+ }
+
+}
foreach my $addon (@{$dh{WITH}}) {
my $mod="Debian::Debhelper::Sequence::$addon";
$mod=~s/-/_/g;