[Reproducible-commits] [dpkg] 02/04: Teach dpkg-genbuildinfo about --build
Niko Tyni
ntyni at moszumanska.debian.org
Mon May 2 21:32:44 UTC 2016
This is an automated email from the git hooks/post-receive script.
ntyni pushed a commit to branch ntyni/reproducible_builds
in repository dpkg.
commit 43f2c361c7cc474ee00faddf5a280f5279503cfe
Author: Niko Tyni <ntyni at debian.org>
Date: Mon May 2 22:46:47 2016 +0300
Teach dpkg-genbuildinfo about --build
The other scripts learned this in 1.18.5, and dpkg-buildpackage will
now pass it through to dpkg-genbuildinfo.
---
man/dpkg-genbuildinfo.1 | 37 +++++++++++++++++++++++++++++++++++++
scripts/dpkg-buildpackage.pl | 6 +++---
scripts/dpkg-genbuildinfo.pl | 6 +++++-
3 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/man/dpkg-genbuildinfo.1 b/man/dpkg-genbuildinfo.1
index 1745f24..586e1eb 100644
--- a/man/dpkg-genbuildinfo.1
+++ b/man/dpkg-genbuildinfo.1
@@ -37,6 +37,43 @@ file describing the build environment and the build products
.
.SH OPTIONS
.TP
+.BI \-\-build= type
+Specifies the build \fItype\fP from a comma-separated list of components
+(since dpkg 1.18.5).
+
+The allowed values are:
+.RS
+.TP
+.B any
+Generate build information including unqualified build dependencies
+(\fBBuild-Depends\fP) and architecture specific build dependencies
+(\fBBuild-Depends-Arch\fP).
+.TP
+.B all
+Generate build information including unqualified build dependencies
+(\fBBuild-Depends\fP) and architecture independent build depencies
+(\fBBuild-Depends-Arch\fP).
+.TP
+.B source
+Effectively ignored: generate build information with just the unqualified
+build dependencies (\fBBuild-Depends\fP).
+.TP
+.B binary
+Generate build information with all three types of build dependencies.
+This is an alias for \fBany,all\fP.
+.TP
+.B full
+Generate build information with all three types of build dependencies.
+This is an alias for \fBany,all,source\fP, and the same as the default case
+when no build option is specified.
+.RE
+.TP
+.B -A
+Equivalent to \fB\-\-build=all\fP.
+.TP
+.B -B
+Equivalent to \fB\-\-build=any\fP.
+.TP
.BI \-c controlfile
Specifies the main source control file to read information from. The
default is
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 27b3ff3..22b78e5 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -287,10 +287,8 @@ while (@ARGV) {
set_build_type(BUILD_BINARY, $_);
} elsif (/^-B$/) {
set_build_type(BUILD_ARCH_DEP, $_);
- push @buildinfo_opts, '-B';
} elsif (/^-A$/) {
set_build_type(BUILD_ARCH_INDEP, $_);
- push @buildinfo_opts, '-A';
} elsif (/^-S$/) {
set_build_type(BUILD_SOURCE, $_);
} elsif (/^-G$/) {
@@ -549,6 +547,8 @@ if ($buildtarget ne 'build' and scalar(@debian_rules) == 1) {
}
}
+my $build_types = get_build_options_from_type();
+
if (build_has_any(BUILD_BINARY)) {
withecho(@debian_rules, $buildtarget);
run_hook('binary', 1);
@@ -556,6 +556,7 @@ if (build_has_any(BUILD_BINARY)) {
run_hook('buildinfo', 1);
+ push @buildinfo_opts, "--build=$build_types" if build_has_none(BUILD_DEFAULT);
push @buildinfo_opts, "--admindir=$admindir" if $admindir;
open my $genbuildinfo_fh, '-|', 'dpkg-genbuildinfo', @buildinfo_opts
@@ -588,7 +589,6 @@ if (build_has_any(BUILD_BINARY)) {
run_hook('changes', 1);
-my $build_types = get_build_options_from_type();
push @changes_opts, "--build=$build_types" if build_has_none(BUILD_DEFAULT);
push @changes_opts, "-m$maint" if defined $maint;
push @changes_opts, "-e$changedby" if defined $changedby;
diff --git a/scripts/dpkg-genbuildinfo.pl b/scripts/dpkg-genbuildinfo.pl
index 77e6f45..e8d5b19 100755
--- a/scripts/dpkg-genbuildinfo.pl
+++ b/scripts/dpkg-genbuildinfo.pl
@@ -139,6 +139,8 @@ sub usage {
'Usage: %s [<option>...]')
. "\n\n" . g_(
"Options:
+ --build=<type>[,...] specify the build <type>: full, source, binary,
+ any, all (default is \'full\').
-B build of only arch-specific files.
-A build of only arch-indep files.
-c<control-file> get control info from this file.
@@ -155,7 +157,9 @@ sub usage {
while (@ARGV) {
$_ = shift(@ARGV);
- if (m/^-B$/) {
+ if (m/^--build=(.*)$/) {
+ set_build_type_from_options($1, $_);
+ } elsif (m/^-B$/) {
set_build_type(BUILD_ARCH_DEP, $_);
} elsif (m/^-A$/) {
set_build_type(BUILD_ARCH_INDEP, $_);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list