From: Ian Jackson Date: Mon, 27 Jul 2015 14:29:15 +0000 (+0100) Subject: Cope with new git-buildpackage which provides gbp, rather than the eponymous command... X-Git-Tag: debian/1.1~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=b87783b9ba972689d934d25650481feec1cdd06d Cope with new git-buildpackage which provides gbp, rather than the eponymous command, on PATH. --- diff --git a/debian/changelog b/debian/changelog index de420106..08036379 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. + * 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. diff --git a/dgit b/dgit index 21cbd56f..9c4d3d6e 100755 --- a/dgit +++ b/dgit @@ -2973,9 +2973,15 @@ sub cmd_build { 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 {