Package: libconfig-model-dpkg-perl
Version: 2.038
Severity: wishlist
Tags: patch

Hello,

I've attached a patch to include support for the XS-Testsuite header in
debian/control, which is documented at
/usr/share/doc/autopkgtest/README.package-tests (or
http://anonscm.debian.org/gitweb/?p=autopkgtest/autopkgtest.git;f=doc/README.package-tests;hb=HEAD)

The only supported value for the moment is "autopkgtest".  I chose "uniline"
with a "fix if not correct" check.  (Possibly, "enum" is better, but I could
not figure out how to automatically correct wrong values. There is a _slight_
learning curve here :)

-- System Information:
Debian Release: 7.1
  APT prefers stable
  APT policy: (500, 'stable'), (400, 'testing'), (399, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libconfig-model-dpkg-perl depends on:
ii  libanyevent-http-perl                   2.15-1
ii  libanyevent-perl                        7.040-3
ii  libapt-pkg-perl                         0.1.26+b1
ii  libconfig-model-perl                    2.041-1
ii  liblog-log4perl-perl                    1.29-1
ii  libmodule-corelist-perl                 2.97-1
ii  libmouse-perl                           1.11-1
ii  libnamespace-autoclean-perl             0.13-1
ii  libparse-recdescent-perl                1.967009+dfsg-1
ii  libsoftware-license-perl                0.103005-1
ii  libtext-autoformat-perl                 1.669004-1
ii  lintian                                 2.5.10.4
ii  perl                                    5.14.2-21
ii  perl-modules [libmodule-corelist-perl]  5.14.2-21

Versions of packages libconfig-model-dpkg-perl recommends:
ii  libconfig-model-tkui-perl  1.339-1

libconfig-model-dpkg-perl suggests no packages.

-- no debconf information
>From 7d7fa9ed3a881b64a73a51a038d6f407be5fbe4e Mon Sep 17 00:00:00 2001
From: Stig Sandbeck Mathisen <s...@debian.org>
Date: Mon, 2 Sep 2013 22:12:34 +0200
Subject: [PATCH] Add XS-Testsuite header

---
 lib/Config/Model/models/Dpkg/Control/Source.pl     |   14 ++++++++++++++
 t/model_tests.d/dpkg-control-examples/xs-testsuite |   17 +++++++++++++++++
 t/model_tests.d/dpkg-control-test-conf.pl          |    7 +++++++
 3 files changed, 38 insertions(+)
 create mode 100644 t/model_tests.d/dpkg-control-examples/xs-testsuite

diff --git a/lib/Config/Model/models/Dpkg/Control/Source.pl b/lib/Config/Model/models/Dpkg/Control/Source.pl
index a4e90f3..0c60f29 100644
--- a/lib/Config/Model/models/Dpkg/Control/Source.pl
+++ b/lib/Config/Model/models/Dpkg/Control/Source.pl
@@ -78,6 +78,20 @@ area/section if the package is in the contrib or non-free archive areas.
 
 '
       },
+      'XS-Testsuite',
+      {
+        'value_type' => 'uniline',
+        'description' => 'Enable a testsuite to be used with this package',
+        'summary' => 'The name of the testsuite',
+        'type' => 'leaf',
+        'default' => 'autopkgtest',
+        'warn_unless_match' => {
+          '^autopkgtest$' => {
+            'msg' => 'Currently, only "autopkgtest" is supported',
+            'fix' => '$_ = undef; # restore default value'
+          }
+        }
+      },
       'XS-Autobuild',
       {
         'default' => '0',
diff --git a/t/model_tests.d/dpkg-control-examples/xs-testsuite b/t/model_tests.d/dpkg-control-examples/xs-testsuite
new file mode 100644
index 0000000..65c2577
--- /dev/null
+++ b/t/model_tests.d/dpkg-control-examples/xs-testsuite
@@ -0,0 +1,17 @@
+Source: libfast-xs-ruby
+Section: ruby
+Priority: optional
+Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintain...@lists.alioth.debian.org>
+Uploaders: Bryan McLellan <b...@loftninjas.org>
+Build-Depends: debhelper (>= 7.0.50~)
+Standards-Version: 3.9.4
+Homepage: http://fast-xs.rubyforge.org/
+XS-Ruby-Versions: all
+XS-Testsuite: autopkgtest
+
+Package: libfast-xs-ruby
+Architecture: any
+XB-Ruby-Versions: ${ruby:Versions}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: fast_xs provides C extensions for escaping text
+ fast_xs provides C extensions for escaping text...
diff --git a/t/model_tests.d/dpkg-control-test-conf.pl b/t/model_tests.d/dpkg-control-test-conf.pl
index 44b9f3f..b367fa7 100644
--- a/t/model_tests.d/dpkg-control-test-conf.pl
+++ b/t/model_tests.d/dpkg-control-test-conf.pl
@@ -161,6 +161,13 @@ providing the following file:
             'binary:libfast-xs-ruby XB-Ruby-Versions' => '${ruby:Versions}',
         },
     },
+    {
+        # test for XS-Testsuite field
+        name => 'xs-testsuite',
+        check => {
+            'source XS-Testsuite' => 'autopkgtest',
+        },
+    },
 );
 
 my $cache_file = 't/model_tests.d/dependency-cache.txt';
-- 
1.7.10.4

Reply via email to