summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-07-27 15:28:24 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-07-27 15:28:24 +0100
commit348b995ead9fbcab890da5d222af36402f33d68c (patch)
tree77dd348507f98850b03de16b8d5d5797eeed36b3
parent627a025403c21c87c4a56135c4b05810104507da (diff)
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.
-rw-r--r--debian/changelog4
-rwxr-xr-xdgit8
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");