]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh
dh is fully working and is being used to build debhelper
[debhelper.git] / dh
diff --git a/dh b/dh
index 15e922c496b49a9236d6cd6e8547df35fa2f0b8b..215833f85b05da992eb332818b32f7e5df1f778a 100755 (executable)
--- a/dh
+++ b/dh
@@ -221,7 +221,7 @@ $sequences{install} = [@{$sequences{build}}, qw{
        dh_gconf
        dh_icons
        dh_perl
-       dh_python
+       dh_pysupport
        dh_scrollkeeper
        dh_usrlocal
 
@@ -242,6 +242,13 @@ $sequences{binary} = [@{$sequences{install}}, qw{
 }, @b];
 $sequences{'binary-arch'} = [@{$sequences{binary}}];
 
+# Third-party commands can be listed in the sequences, but should be
+# listed here as well. They will not be run if not present.
+my %thirdparty=(
+       dh_pycompat => 1,
+       dh_pysupport => 1,
+);
+
 # Get the sequence of commands to run.
 if (! @ARGV) {
        error "specify a sequence to run";
@@ -350,6 +357,11 @@ sub run {
                unshift @options, "-k";
        }
 
+       # If a third party command is not in /usr/bin, don't try to run it.
+       if ($thirdparty{$command} && ! -x "/usr/bin/$command") {
+               return;
+       }
+
        # The 4 spaces is a kind of half indent.
        print "    ".escape_shell($command, @options)."\n";