]> git.donarmstrong.com Git - debhelper.git/commitdiff
dh: Add remove_command to the sequence interface.
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 19 May 2008 16:39:02 +0000 (12:39 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 19 May 2008 16:39:02 +0000 (12:39 -0400)
debian/changelog
dh

index 3734cd82203177147dc034be36b5e4d3c632a913..c5b5e48eb9080b7b638cdb246f69cd51a3b333c3 100644 (file)
@@ -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 <joeyh@debian.org>  Mon, 05 May 2008 18:53:10 -0400
 
diff --git a/dh b/dh
index a116e3a0e35dccefa898d018d07da5972c367a8d..3882090f2b8c7ffaec8581e08c3de46c3e1ad7a1 100755 (executable)
--- 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;