From 348b995ead9fbcab890da5d222af36402f33d68c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 27 Jul 2015 15:28:24 +0100 Subject: When invoking git-buildpackage via dgit gbp-build, consider our command line arguments when massaging the dpkg-buildpackage arguments, so that we don't end up giving dpkg-buildpackage contradictory instructions. --- debian/changelog | 4 ++++ dgit | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7537ba2..de42010 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,10 @@ dgit (1.1~~) unstable; urgency=low * Work around #793471 (madness with $SIG{__WARN__} and Perl's system builtin): move $SIG{} setting into setup_sigwarn in Dgit.pm, and check getppid. + * When invoking git-buildpackage via dgit gbp-build, consider our + command line arguments when massaging the dpkg-buildpackage arguments, + so that we don't end up giving dpkg-buildpackage contradictory + instructions. Configurability: * Honour dgit-distros.DISTRO.cmd-CMD and .opts-CMD. Closes:#793427. diff --git a/dgit b/dgit index ad460d1..21cbd56 100755 --- a/dgit +++ b/dgit @@ -2944,8 +2944,8 @@ sub changesopts () { return (changesopts_initial(), changesopts_version()); } -sub massage_dbp_args ($) { - my ($cmd) = @_; +sub massage_dbp_args ($;$) { + my ($cmd,$xargs) = @_; if ($cleanmode eq 'dpkg-source') { $suppress_clean = 1; return; @@ -2956,7 +2956,7 @@ sub massage_dbp_args ($) { push @newcmd, '-nc'; # and some combinations of -S, -b, et al, are errors, rather than # later simply overriding earlier - push @newcmd, '-F' unless grep { m/^-[bBASF]$/ } @$cmd; + push @newcmd, '-F' unless grep { m/^-[bBASF]$/ } (@$cmd, @$xargs); push @newcmd, @$cmd; @$cmd = @newcmd; } @@ -2972,7 +2972,7 @@ sub cmd_build { sub cmd_gbp_build { my @dbp = @dpkgbuildpackage; - massage_dbp_args \@dbp; + massage_dbp_args \@dbp, \@ARGV; my @cmd = (qw(git-buildpackage -us -uc --git-no-sign-tags), "--git-builder=@dbp"); -- cgit v1.2.3