[dpkg] 159/200: Revert "dpkg-source: Generate Testsuite-Restrictions fields from test restrictions"
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:17:34 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository dpkg.
commit d5a9cf8b9dcfbb717c7748e1ffd2e287e12b035d
Author: Guillem Jover <guillem at debian.org>
Date: Sun Jan 29 20:28:15 2017 +0100
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
---
debian/changelog | 5 +++++
man/dsc.man | 7 -------
scripts/Dpkg/Control/FieldsCore.pm | 7 +------
scripts/Makefile.am | 1 -
scripts/dpkg-source.pl | 17 -----------------
scripts/t/dpkg_source.t | 16 +---------------
scripts/t/dpkg_source/testsuite_4.dsc | 17 -----------------
7 files changed, 7 insertions(+), 63 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 81752e3..6d83fc9 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 6464fe0..70ccb87 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 70fcc9d..8eeddad 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 953efdb..5583fa9 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 bdbe911..da5f25e 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 317e445..2de0c0d 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 at 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 197cdbc..0000000
--- 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 at 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
--
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