* 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.
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;
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;
}
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");