Browse Source

dpkg-buildpackage: Ignore DEB_CHECK_COMMAND on DEB_BUILD_OPTIONS nocheck

Guillem Jover 12 years ago
parent
commit
2a9e9e5e6a
2 changed files with 10 additions and 1 deletions
  1. 4 0
      man/dpkg-buildpackage.1
  2. 6 1
      scripts/dpkg-buildpackage.pl

+ 4 - 0
man/dpkg-buildpackage.1

@@ -270,6 +270,10 @@ Overridden by the \fB\-\-check\-command\fP option.
 If set, it will be used to sign the \fB.changes\fP and \fB.dsc\fP files.
 If set, it will be used to sign the \fB.changes\fP and \fB.dsc\fP files.
 Overridden by the \fB\-k\fP option.
 Overridden by the \fB\-k\fP option.
 .TP
 .TP
+.B DEB_BUILD_OPTIONS
+If set, and containing \fBnocheck\fP the \fBDEB_CHECK_COMMAND\fP variable
+will be ignored.
+.TP
 .B DEB_BUILD_PROFILES
 .B DEB_BUILD_PROFILES
 If set, it will be used as the active build profile(s) for the package
 If set, it will be used as the active build profile(s) for the package
 being built. It is a space separated list of profile names, without the
 being built. It is a space separated list of profile names, without the

+ 6 - 1
scripts/dpkg-buildpackage.pl

@@ -175,6 +175,12 @@ sub build_opt {
     }
     }
 }
 }
 
 
+my $build_opts = Dpkg::BuildOptions->new();
+
+if ($build_opts->has('nocheck')) {
+    $check_command = undef;
+}
+
 while (@ARGV) {
 while (@ARGV) {
     $_ = shift @ARGV;
     $_ = shift @ARGV;
 
 
@@ -328,7 +334,6 @@ if ($signcommand) {
     }
     }
 }
 }
 
 
-my $build_opts = Dpkg::BuildOptions->new();
 if (defined $parallel) {
 if (defined $parallel) {
     $parallel = $build_opts->get('parallel') if $build_opts->has('parallel');
     $parallel = $build_opts->get('parallel') if $build_opts->has('parallel');
     $ENV{MAKEFLAGS} ||= '';
     $ENV{MAKEFLAGS} ||= '';