[PATCH] Add --debbuildopts option (Closes: #458975).

Cyril Brulebois cyril.brulebois at kerlabs.com
Tue Aug 19 12:52:20 UTC 2008


---
 lib/Sbuild/Build.pm   |    4 +++-
 lib/Sbuild/Options.pm |    1 +
 man/sbuild.1.in       |    5 +++++
 3 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
index d1b1367..9bdedf1 100644
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -581,6 +581,8 @@ EOF
 	    $conf::force_orig_source ? "-sa" : "" :
 	    $self->get_option('Build Arch All') ?	"-b" : "-B";
 
+	my $debbuildopts = $Sbuild::Conf::debbuildopts || '';
+
 	my $bdir = $self->{'Session'}->strip_chroot_path($dscdir);
 	if (-f "$self->{'Chroot Dir'}/etc/ld.so.conf" &&
 	    ! -r "$self->{'Chroot Dir'}/etc/ld.so.conf") {
@@ -591,7 +593,7 @@ EOF
 	    (defined($self->get_option('LD_LIBRARY_PATH')) ?
 	     "LD_LIBRARY_PATH=".$self->get_option('LD_LIBRARY_PATH')." " : "").
 	     "exec $conf::build_env_cmnd dpkg-buildpackage $conf::pgp_options ".
-	     "$binopt " . $self->get_option('Signing Options') .
+	     "$binopt $debbuildopts " . $self->get_option('Signing Options') .
 	     " -r$conf::fakeroot 2>&1";
 	$self->{'Session'}->exec_command($buildcmd, $Sbuild::Conf::username, 1, 0, undef);
     }
diff --git a/lib/Sbuild/Options.pm b/lib/Sbuild/Options.pm
index 192688b..618cf02 100644
--- a/lib/Sbuild/Options.pm
+++ b/lib/Sbuild/Options.pm
@@ -187,6 +187,7 @@ sub parse_options (\%) {
 		       "q|quiet" => sub {
 			   $Sbuild::Sbuild::Conf::verbose-- if $Sbuild::Conf::verbose;
 		       },
+		       "debbuildopts=s" => \$Sbuild::Conf::debbuildopts,
 	);
 }
 
diff --git a/man/sbuild.1.in b/man/sbuild.1.in
index 1b4cf15..fa6aaf8 100644
--- a/man/sbuild.1.in
+++ b/man/sbuild.1.in
@@ -38,6 +38,7 @@ sbuild \- build debian packages from source
 .RB [ \-\-purge=\fPpurge-mode\fP ]
 .RB [ \-b \[or] \-\-batch]
 .RB [ \-\-nolog ]
+.RB [ \-\-debbuildopts=\fIdpkg-buildpackage-options\fP ]
 .BR PACKAGE1_VERSION[.dsc] " [" PACKAGE2_VERSION[.dsc] " [" PACKAGE\f[BI]n\fP_VERSION[.dsc] ]]
 .SH VERSION
 This man page documents the packaged version of sbuild.  This version
@@ -184,6 +185,10 @@ mails will be modified by \fBsbuild\fR automatically.
 The version number of the binary NMU.  This should be used in conjunction with
 \-\-make\-binNMU.  \fIversion\fP is a single number for the (+b\fIn\fR) format
 used for binary NMUs.
+.TP
+.BR "\-\-debbuildopts=\fIdpkg-buildpackage-options\fP"
+The additional options to pass to \fBdpkg-buildpackage\fR. That covers at least
+the \fI-vVERSION\fP option. No check is performed on those options.
 .SH ENVIRONMENT VARIABLES
 The following environment variables are used by \fBsbuild\fR:
 .IP "HOME"
-- 
1.5.6.3


--=_bohort-14752-1219186932-0001-2--





More information about the Buildd-tools-devel mailing list