summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Dpkg/Control/Fields.pm16
-rwxr-xr-xscripts/dpkg-buildpackage.pl4
-rwxr-xr-xscripts/dpkg-checkbuilddeps.pl27
-rwxr-xr-xscripts/dpkg-source.pl2
4 files changed, 36 insertions, 13 deletions
diff --git a/scripts/Dpkg/Control/Fields.pm b/scripts/Dpkg/Control/Fields.pm
index 41b5d9ca8..8ff4c4779 100644
--- a/scripts/Dpkg/Control/Fields.pm
+++ b/scripts/Dpkg/Control/Fields.pm
@@ -61,23 +61,33 @@ our %FIELDS = (
'Build-Conflicts' => {
allowed => ALL_SRC,
dependency => 'union',
- dep_order => 3,
+ dep_order => 4,
+ },
+ 'Build-Conflicts-Arch' => {
+ allowed => ALL_SRC,
+ dependency => 'union',
+ dep_order => 5,
},
'Build-Conflicts-Indep' => {
allowed => ALL_SRC,
dependency => 'union',
- dep_order => 4,
+ dep_order => 6,
},
'Build-Depends' => {
allowed => ALL_SRC,
dependency => 'normal',
dep_order => 1,
},
- 'Build-Depends-Indep' => {
+ 'Build-Depends-Arch' => {
allowed => ALL_SRC,
dependency => 'normal',
dep_order => 2,
},
+ 'Build-Depends-Indep' => {
+ allowed => ALL_SRC,
+ dependency => 'normal',
+ dep_order => 3,
+ },
'Built-Using' => {
allowed => ALL_PKG,
dependency => 'union',
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 7222fb900..5fd2d3002 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -214,14 +214,14 @@ while (@ARGV) {
build_sourceonly && usageerr(_g("cannot combine %s and %s"), $_, "-S");
$include = BUILD_ARCH_INDEP;
push @changes_opts, '-A';
- @checkbuilddep_opts = ();
+ @checkbuilddep_opts = ('-A');
$buildtarget = 'build-indep';
$binarytarget = 'binary-indep';
} elsif (/^-S$/) {
build_binaryonly && usageerr(_g("cannot combine %s and %s"), build_opt, "-S");
$include = BUILD_SOURCE;
push @changes_opts, '-S';
- @checkbuilddep_opts = ('-B');
+ @checkbuilddep_opts = ('-A', '-B');
} elsif (/^-F$/) {
!build_normal && usageerr(_g("cannot combine %s and %s"), $_, build_opt);
$include = BUILD_ALL;
diff --git a/scripts/dpkg-checkbuilddeps.pl b/scripts/dpkg-checkbuilddeps.pl
index e6e97ce51..31ab143d6 100755
--- a/scripts/dpkg-checkbuilddeps.pl
+++ b/scripts/dpkg-checkbuilddeps.pl
@@ -43,7 +43,8 @@ sub usage {
"Usage: %s [<option>...] [<control-file>]")
. "\n\n" . _g(
"Options:
- -B binary-only, ignore -Indep.
+ -A ignore Build-Depends-Arch and Build-Conflicts-Arch.
+ -B ignore Build-Depends-Indep and Build-Conflicts-Indep.
-d build-deps use given string as build dependencies instead of
retrieving them from control file
-c build-conf use given string for build conflicts instead of
@@ -58,10 +59,12 @@ sub usage {
. "\n", $progname;
}
-my $binary_only=0;
+my $ignore_bd_arch = 0;
+my $ignore_bd_indep = 0;
my ($bd_value, $bc_value);
my $host_arch = get_host_arch();
-if (!GetOptions('B' => \$binary_only,
+if (!GetOptions('A' => \$ignore_bd_arch,
+ 'B' => \$ignore_bd_indep,
'help|h' => sub { usage(); exit(0); },
'version' => \&version,
'd=s' => \$bd_value,
@@ -82,11 +85,21 @@ my $facts = parse_status("$admindir/status");
unless (defined($bd_value) or defined($bc_value)) {
$bd_value = 'build-essential';
$bd_value .= ", " . $fields->{"Build-Depends"} if defined $fields->{"Build-Depends"};
- if (not $binary_only and defined $fields->{"Build-Depends-Indep"}) {
+ if (not $ignore_bd_arch and defined $fields->{"Build-Depends-Arch"}) {
+ $bd_value .= ", " . $fields->{"Build-Depends-Arch"};
+ }
+ if (not $ignore_bd_indep and defined $fields->{"Build-Depends-Indep"}) {
$bd_value .= ", " . $fields->{"Build-Depends-Indep"};
}
$bc_value = $fields->{"Build-Conflicts"} if defined $fields->{"Build-Conflicts"};
- if (not $binary_only and defined $fields->{"Build-Conflicts-Indep"}) {
+ if (not $ignore_bd_arch and defined $fields->{"Build-Conflicts-Arch"}) {
+ if ($bc_value) {
+ $bc_value .= ", " . $fields->{"Build-Conflicts-Arch"};
+ } else {
+ $bc_value = $fields->{"Build-Conflicts-Arch"};
+ }
+ }
+ if (not $ignore_bd_indep and defined $fields->{"Build-Conflicts-Indep"}) {
if ($bc_value) {
$bc_value .= ", " . $fields->{"Build-Conflicts-Indep"};
} else {
@@ -97,12 +110,12 @@ unless (defined($bd_value) or defined($bc_value)) {
my (@unmet, @conflicts);
if ($bd_value) {
- push @unmet, build_depends('Build-Depends/Build-Depends-Indep',
+ push @unmet, build_depends('Build-Depends/Build-Depends-Arch/Build-Depends-Indep',
deps_parse($bd_value, host_arch => $host_arch,
reduce_arch => 1), $facts);
}
if ($bc_value) {
- push @conflicts, build_conflicts('Build-Conflicts/Build-Conflicts-Indep',
+ push @conflicts, build_conflicts('Build-Conflicts/Build-Conflicts-Arch/Build-Conflicts-Indep',
deps_parse($bc_value, host_arch => $host_arch,
reduce_arch => 1, union => 1), $facts);
}
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index d30f87f94..2f9318a4a 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -246,7 +246,7 @@ if ($options{'opmode'} =~ /^(-b|--print-format|--(before|after)-build|--commit)$
$fields->{$_} = $v;
} elsif (m/^Uploaders$/i) {
($fields->{$_} = $v) =~ s/\s*[\r\n]\s*/ /g; # Merge in a single-line
- } elsif (m/^Build-(Depends|Conflicts)(-Indep)?$/i) {
+ } elsif (m/^Build-(Depends|Conflicts)(-Arch|-Indep)?$/i) {
my $dep;
my $type = field_get_dep_type($_);
$dep = deps_parse($v, union => $type eq 'union');