From: Joey Hess Date: Mon, 19 May 2008 16:39:02 +0000 (-0400) Subject: dh: Add remove_command to the sequence interface. X-Git-Tag: 7.0.9~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8b2b327bb59a4ff9f207076658183df8aecc74ea;p=debhelper.git dh: Add remove_command to the sequence interface. --- diff --git a/debian/changelog b/debian/changelog index 3734cd8..c5b5e48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ debhelper (7.0.9) UNRELEASED; urgency=low in a future (v8) compatability level. Closes: #471060 * dh: fix POD error. Closes: #480191 * dh: Typo fixes. Closes: #480200 + * dh: Add remove_command to the sequence interface. -- Joey Hess Mon, 05 May 2008 18:53:10 -0400 diff --git a/dh b/dh index a116e3a..3882090 100755 --- a/dh +++ b/dh @@ -91,6 +91,10 @@ Insert I in sequences before I. Insert I in sequences after I. +=item Debian::Debhelper::Dh_Lib::remove_command(existing_command) + +Remove I 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;