chiark / gitweb /
Cope with new git-buildpackage which provides gbp, rather than the eponymous command...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 27 Jul 2015 14:29:15 +0000 (15:29 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 27 Jul 2015 14:29:15 +0000 (15:29 +0100)
debian/changelog
dgit

index de420106eff4f48c3efbc969574464086d2dda89..08036379518117f23691e73f43eac80d2dbce960 100644 (file)
@@ -14,6 +14,8 @@ dgit (1.1~~) unstable; urgency=low
     command line arguments when massaging the dpkg-buildpackage arguments,
     so that we don't end up giving dpkg-buildpackage contradictory
     instructions.
     command line arguments when massaging the dpkg-buildpackage arguments,
     so that we don't end up giving dpkg-buildpackage contradictory
     instructions.
+  * Cope with new git-buildpackage which provides gbp, rather than the
+    eponymous command, on PATH.
 
   Configurability:
   * Honour dgit-distros.DISTRO.cmd-CMD and .opts-CMD.  Closes:#793427.
 
   Configurability:
   * Honour dgit-distros.DISTRO.cmd-CMD and .opts-CMD.  Closes:#793427.
diff --git a/dgit b/dgit
index 21cbd56f67d26cc1cd8ab11052461f4c37d6ef5c..9c4d3d6e66297c148678945c57dd4757fc34f733 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2973,9 +2973,15 @@ sub cmd_build {
 sub cmd_gbp_build {
     my @dbp = @dpkgbuildpackage;
     massage_dbp_args \@dbp, \@ARGV;
 sub cmd_gbp_build {
     my @dbp = @dpkgbuildpackage;
     massage_dbp_args \@dbp, \@ARGV;
-    my @cmd =
-       (qw(git-buildpackage -us -uc --git-no-sign-tags),
-        "--git-builder=@dbp");
+
+    my @cmd;
+    if (length executable_on_path('git-buildpackage')) {
+       @cmd = qw(git-buildpackage);
+    } else {
+       @cmd = qw(gbp buildpackage);
+    }
+    push @cmd, (qw(-us -uc --git-no-sign-tags), "--git-builder=@dbp");
+
     if ($cleanmode eq 'dpkg-source') {
        $suppress_clean = 1;
     } else {
     if ($cleanmode eq 'dpkg-source') {
        $suppress_clean = 1;
     } else {