]> git.donarmstrong.com Git - debhelper.git/commitdiff
dh: Allow creation of new sequences (such as to handle a patch target for quilt)...
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 6 Aug 2009 15:08:45 +0000 (11:08 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 6 Aug 2009 15:08:45 +0000 (11:08 -0400)
debian/changelog
dh
doc/PROGRAMMING

index ae3846c3c223a954ea8feae3bc85beea5f78470e..69e75190972ea0abdb10c15a45740401d554fddf 100644 (file)
@@ -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 <joeyh@debian.org>  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 c34a5a0273e952f359e8b92cf14c19ab7f73c24b..2a6c0a31cf1fa6f87969dbc8e2a35900b7428356 100755 (executable)
--- 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;
index 4e7ea463dfed10678a65e62bba35998c501d4b85..c3530f26f5f82319a09fcb8fa02e0849f29bb587 100644 (file)
@@ -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:
 -------------------