summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2017-01-29 20:28:15 +0100
committerGuillem Jover <guillem@debian.org>2017-01-29 20:28:15 +0100
commitd5a9cf8b9dcfbb717c7748e1ffd2e287e12b035d (patch)
treeb1269c93865fc80132351055562de28a9639961f
parentca30a8d1dbbf5f978242b90d4f690116ae7004a9 (diff)
downloaddpkg-d5a9cf8b9dcfbb717c7748e1ffd2e287e12b035d.tar.gz
Revert "dpkg-source: Generate Testsuite-Restrictions fields from test restrictions"
This reverts commit 9899bdcf9bde76d969b124abf0a898fcbb202c70. This change is contentious and should have been discussed more widely. Given that this has been live only for a couple of days, the impact should be minimal, but still something to take into account once and if this gets reintroduced, in the same or different form and shape. Closes: #852820
-rw-r--r--debian/changelog5
-rw-r--r--man/dsc.man7
-rw-r--r--scripts/Dpkg/Control/FieldsCore.pm7
-rw-r--r--scripts/Makefile.am1
-rwxr-xr-xscripts/dpkg-source.pl17
-rw-r--r--scripts/t/dpkg_source.t16
-rw-r--r--scripts/t/dpkg_source/testsuite_4.dsc17
7 files changed, 7 insertions, 63 deletions
diff --git a/debian/changelog b/debian/changelog
index 81752e3a7..6d83fc9fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,11 @@
dpkg (1.18.21) UNRELEASED; urgency=medium
[ Guillem Jover ]
+ * Revert "Generate Testsuite-Restrictions fields from the test restrictions
+ in dpkg-source into .dsc files". This change is contentious and should
+ have been discussed more widely. Given that this has been live only for
+ a couple of days, the impact should be minimal, but still something to
+ take into account once and if this gets reintroduced. Closes: #852820
* Perl modules:
- Map alternative or old ELF machine types to canonical ones. We need
those to match on the encoded ABI, otherwise dpkg-shlibdeps will not
diff --git a/man/dsc.man b/man/dsc.man
index 6464fe096..70ccb87f3 100644
--- a/man/dsc.man
+++ b/man/dsc.man
@@ -153,13 +153,6 @@ generated by this source package and meta-dependencies such as \fB@\fP or
Rationale: this field is needed because otherwise to be able to get the
test dependencies, each source package would need to be unpacked.
.TP
-.BI Testsuite\-Restrictions: " name-list"
-This field declares the comma-separated union of all test restrictions
-(\fBRestrictions\fP fields in \fIdebian/tests/control\fP file).
-
-Rationale: this field is needed because otherwise to be able to get the
-test restrictions, each source package would need to be unpacked.
-.TP
.BI Build\-Depends: " package-list"
.TQ
.BI Build\-Depends\-Arch: " package-list"
diff --git a/scripts/Dpkg/Control/FieldsCore.pm b/scripts/Dpkg/Control/FieldsCore.pm
index 70fcc9de3..8eeddadb1 100644
--- a/scripts/Dpkg/Control/FieldsCore.pm
+++ b/scripts/Dpkg/Control/FieldsCore.pm
@@ -383,10 +383,6 @@ our %FIELDS = (
allowed => ALL_SRC,
separator => FIELD_SEP_COMMA,
},
- 'Testsuite-Restrictions' => {
- allowed => ALL_SRC,
- separator => FIELD_SEP_COMMA,
- },
'Testsuite-Triggers' => {
allowed => ALL_SRC,
separator => FIELD_SEP_COMMA,
@@ -476,8 +472,7 @@ our %FIELD_ORDER = (
qw(Format Source Binary Architecture Version Origin Maintainer
Uploaders Homepage Standards-Version Vcs-Browser
Vcs-Arch Vcs-Bzr Vcs-Cvs Vcs-Darcs Vcs-Git Vcs-Hg Vcs-Mtn
- Vcs-Svn Testsuite Testsuite-Triggers Testsuite-Restrictions),
- &field_list_src_dep(),
+ Vcs-Svn Testsuite Testsuite-Triggers), &field_list_src_dep(),
qw(Package-List), @checksum_fields, qw(Files)
],
CTRL_FILE_BUILDINFO() => [
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 953efdbce..5583fa960 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -326,7 +326,6 @@ test_data = \
t/dpkg_source/testsuite_1.dsc \
t/dpkg_source/testsuite_2.dsc \
t/dpkg_source/testsuite_3.dsc \
- t/dpkg_source/testsuite_4.dsc \
t/merge_changelogs/ch-old \
t/merge_changelogs/ch-a \
t/merge_changelogs/ch-b \
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index bdbe91177..da5f25ed6 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -520,7 +520,6 @@ sub set_testsuite_fields
$tests->load("$dir/debian/tests/control");
set_testsuite_triggers_field($tests, $fields, @binarypackages);
- set_testsuite_restrictions_field($tests, $fields);
} elsif ($testsuite{autopkgtest}) {
warning(g_('%s field contains value %s, but no tests control file %s'),
'Testsuite', 'autopkgtest', 'debian/tests/control');
@@ -551,22 +550,6 @@ sub set_testsuite_triggers_field
$fields->{'Testsuite-Triggers'} = join ', ', sort keys %testdeps;
}
-sub set_testsuite_restrictions_field
-{
- my ($tests, $fields) = @_;
- my %restrict;
-
- # Never overwrite a manually defined field.
- return if $fields->{'Testsuite-Restrictions'};
-
- foreach my $test ($tests->get()) {
- next unless $test->{Restrictions};
-
- $restrict{$_} = 1 foreach (split /[,\s]+/, $test->{Restrictions});
- }
- $fields->{'Testsuite-Restrictions'} = join ', ', sort keys %restrict;
-}
-
sub setopmode {
my $opmode = shift;
diff --git a/scripts/t/dpkg_source.t b/scripts/t/dpkg_source.t
index 317e445f0..2de0c0dbb 100644
--- a/scripts/t/dpkg_source.t
+++ b/scripts/t/dpkg_source.t
@@ -16,7 +16,7 @@
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 8;
use Test::Dpkg qw(test_neutralize_checksums);
use File::Spec::Functions qw(rel2abs);
@@ -64,20 +64,12 @@ Architecture: all
Description: test package
TMPL_CONTROL
-my $tmpl_tests_control = <<'TMPL_TESTS_CONTROL';
-Test-Command: ${test-command}
-Depends: ${test-depends}
-Restrictions: ${test-restrictions}
-TMPL_TESTS_CONTROL
-
my %default_substvars = (
'source-name' => 'test-source',
'source-version' => 0,
'source-section' => 'test',
'source-priority' => 'optional',
'source-testsuite' => 'autopkgtest',
- 'test-command' => 'true',
- 'test-depends' => '@',
'suite' => 'unstable',
'urgency' => 'low',
'maintainer' => 'Dpkg Developers <debian-dpkg@lists.debian.org>',
@@ -176,10 +168,4 @@ $dirname = gen_source('source-name' => 'testsuite',
'source-version' => 3);
test_build_source($dirname);
-$dirname = gen_source('source-name' => 'testsuite',
- 'source-version' => 4,
- 'test-restrictions' => 'needs-root,build-needed allow-stderr',
- 'control-test' => $tmpl_tests_control);
-test_build_source($dirname);
-
1;
diff --git a/scripts/t/dpkg_source/testsuite_4.dsc b/scripts/t/dpkg_source/testsuite_4.dsc
deleted file mode 100644
index 197cdbc76..000000000
--- a/scripts/t/dpkg_source/testsuite_4.dsc
+++ /dev/null
@@ -1,17 +0,0 @@
-Format: 3.0 (native)
-Source: testsuite
-Binary: test-binary
-Architecture: all
-Version: 4
-Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
-Standards-Version: 1.0
-Testsuite: autopkgtest
-Testsuite-Restrictions: allow-stderr, build-needed, needs-root
-Package-List:
- test-binary deb test optional arch=all
-Checksums-Sha1:
- 0000000000000000000000000000000000000000 0 testsuite_4.tar.xz
-Checksums-Sha256:
- 0000000000000000000000000000000000000000000000000000000000000000 0 testsuite_4.tar.xz
-Files:
- 00000000000000000000000000000000 0 testsuite_4.tar.xz